1

I'm trying to learn some basic real-world-ish .NET deployment stuff (using Web Deploy, remote debugging) by getting a hello-world application to run on several virtual servers. What I want is to have a virtual machine, called vbox-web on a VirtualBox host-only network, where it will be accessible from the host and from other guests on that same virtual network using that host name. (And later add another VM, vbox-db, but that's outside the scope of this question.)

What I have done so far:

  • The VirtualBox host-only network adapter is set to configure automatically, the network is 192.168.145.1/24, DHCP is enabled at .2, addresses it hands out start at .101
  • The VM has Windows Server 2016 installed, with the DNS and IIS roles enabled, no further configuration to those. The host-only network adapter in the VM is also set to statically use 192.168.145.100 as the IP address, and as the DNS server. (Curiously, if have that adapter get the address over DHCP, it doesn't work - it just gets an automatic link-local address.) The computer name is also set to vbox-web.
  • The host network adapter is set to get the address over DHCP, receives the address 192.168.145.1 as expected. I've also set it to use 192.168.145.100 as the DNS server.

What this gets me:

  • In a browser in the VM, I can open the default IIS homepage through http://localhost/, as well as http://vbox-web/
  • In a browser in the host, I can open that same homepage using http://192.168.145.1/, but not using http://vbox-web/ - i.e. what I want to accomplish here.
  • nslookup - localhost in the VM tells me the DNS request timed out; seems like the DNS server isn't even running?

This means the problem isn't about being able to connect to the guest; I'm missing the part of the puzzle that gets DNS to work correctly here.

Workarounds I'm not interested in:

  • Using IPs directly - I want a somewhat realistic setup, nobody sane puts straight IPs into connection strings.
  • Using /etc/hosts - see above, there's a reason DNS exists.
  • Using bridged networking and letting the wifi router's DNS handle this - this won't work in a workplace network; and also, something that wifi router firmware can do must be doable using a full OS.
  • Docker automagical networking - I need VirtualBox working for other work stuff, Docker for Windows would require enabling HyperV and thus knocking out other hypervisors.
  • I suspect your DNS server really isn't even running. You said you didn't configure it in any way; how does it know what names to serve? The VM knows its own hostname, that's why it can connect to itself using a name. – Johan Myréen Dec 22 '17 at 16:16
  • I’m extrapolating from how a wifi router knows how to resolve names for devices on the network - clearly there’s some mechanisms by which hosts on a network announce their presence with a name, so I’m wondering how to enable that? – millimoose Dec 22 '17 at 19:52
  • That said I have since managed to get something working by using the automagical wizard provided in Windows Server Essentials that seems to put all the parts into order by default, I’ve just yet to answerify this. – millimoose Dec 22 '17 at 19:53
  • 1
    The mechanism by which Windows machines announce their names on the network is Link Local Multicast Name Resolution (LLMNR). This is a decentralised, serverless mechanism that is separate from DNS. As the name says, LLMNR only works over the local network, the messages don't pass routers. LLMNR is available depending on the type of the network set in Windows, it is disabled if the network is "public". – Johan Myréen Dec 23 '17 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.