I have a Win 10 physical host with VirtualBox v6.1.34 and a guest OS of CentOS 7.
As a default setting, the VirtualBox Host-Only Ethernet Adapter is on 192.168.56.1/24, and the guest connects to this network adapter in Automatic mode.
After booting up, the guest acquired the address through DHCP, and I verified it by calling the command ifconfig on the guest. To be simple, the hostname of the guest OS is the same as the VM's name.
I also followed this link and verified the record of the DHCP lease. By the way, the leasing record contains the IP and MAC addresses, but I didn't find any indication about either hostname, domain name, or VirtualBox VM name.
However, I could not ping the guest by the VM's name on the physical host. As said before, it is the same as the hostname.
- I tried
ping hostnameandping hostname.localbut they didn't work. - With the known address,
ping 192.168.56.xxxworks.
Please let me know if you need more information.
I am new to networking, so I would highly appreciate your suggestions with some pointers on the basic concepts, e.g. subnet, gateway, router, DNS, DHCP, etc.