MacOS DNS not checking alternates

dnsNetwork

[MacBook Pro, MacOS High Sierra host, Ubuntu 16.04 LTS Guest]

I have a VM running in VirtualBox which has its own DNS server. I am also connected to a LAN that has a DNS server configured via DHCP.

I would like to be able to access the domains I have on the VM using domain names (I'm have virtual hosting setup) but MacOS does not check all the configured DNS servers network settings.

When I put the IP of my VM's DNS server first in the Advanced/DSN settings list, I am able to resolve the VM's domains, but can't access anything outside the lab (eg Google).
When I put the IP of the LAN's DNS server first, I cannot access the domains on the VM, but I can access global domains (ie Google now works).

What am I doing wrong?

Best Answer

The default Virtual Box machine network settings are shown below.

x1

Try changing the settings to what is shown below.

x2

This should cause your virtual machine to use the same DHCP and DNS as your physical machines. Basically, your virtual machine will be on the same LAN as your physical machines.