open network access to virtualbox guest from host only

Discussions related to using VirtualBox on Linux hosts.
brainchild
Posts: 44
Joined: 31. May 2021, 02:09

Re: open network access to virtualbox guest from host only

Post by brainchild »

scottgus1 wrote:The only documentation I have seen is the manual, which in PDF form is text-searchable. There's some references to DNS in the 'changenat' link above, but I don't recall mention of a Virtualbox-provided DNS server.
I was considering documentation in a more general sense, such as to include the series of postings you had referenced in your original response. In fact, I reviewed that material most closely, which led me to notice the dhcpserver subcommand of the VboxManage tool, documented in Chapter 8 of the manual, providing fine-grained control of the DHCP server running on a host-only network. The command offers a range of functionality, much of it well suited for automation, but I found no mention of a DNS server, unfortunately. I have also had no success with tests on my deployment attempting to discover results similarly favorable as yours.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: open network access to virtualbox guest from host only

Post by scottgus1 »

The forum has some tutorials in the How-To's and Tutorials section.

I couldn't find anything about a Virtualbox DNS server. I don't know the structure that exists for Windows OS's to learn other Windows' OS names. Maybe, if that could be discovered, something similar could be set up for Linux.
brainchild
Posts: 44
Joined: 31. May 2021, 02:09

Re: open network access to virtualbox guest from host only

Post by brainchild »

scottgus1 wrote: I don't know the structure that exists for Windows OS's to learn other Windows' OS names. Maybe, if that could be discovered, something similar could be set up for Linux.
I have not followed your last round of comments.

My main idea was that VirtualBox in principle could easily offer a DNS server alongside the DHCP server already available on host-only networks, and the only indication at the moment I have that it does so is that you have observed it. I myself, however, have been unable to observe it similarly.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: open network access to virtualbox guest from host only

Post by scottgus1 »

All I have seen so far is this:

I started with an XP VM connected via DHCP-enabled Host-Only on a Windows 10 host, but with the 'cable' disconnected so there is no network between host and VM. The XP OS had "File and Printer Sharing" turned off, its default setting in a new XP install. I set the XP OS to a new network name the host had never seen before, rebooted the VM as needed, then plugged in the 'cable':

When the VM OS had "File and Printer Sharing" turned off, I could ping between host and VM using the IP addresses only. I could not ping the VM using the XP network name.

When I turned on "File and Printer Sharing" in XP, I was then able to ping the VM using the XP network name.

As far as I have ever heard, Host-Only does not have a DNS server.

So some part of Windows "File and Printer Sharing" is what broadcasts the OS network names, at least to other Windows PCs. You could research how to get Linux OS's to do what Windows is doing, then no DNS server would be needed. Try web-searching "windows name resolution compatible with Linux", https://www.techrepublic.com/article/ho ... hostnames/ and https://docs.microsoft.com/en-us/opensp ... 48e748cd44
brainchild
Posts: 44
Joined: 31. May 2021, 02:09

Re: open network access to virtualbox guest from host only

Post by brainchild »

scottgus1 wrote:As far as I have ever heard, Host-Only does not have a DNS server.

So some part of Windows "File and Printer Sharing" is what broadcasts the OS network names, at least to other Windows PCs.
I understand now.

I do have a vague understanding that Windows uses some peer-to-peer discovery scheme, which is probably linked to the configuration option you mentioned.
Post Reply