For a lab setup, I have created two vms in virtualbox(server 2019) Both are server 2019 datacenter. Both are connected to NAT and Hostonly adapters first machine, I have setup Domain controller and DNS linked to hostonly adapter. The same IP I kept in the 2nd machine as DNS server in the hostonly adapter. If I kept the NAT network as is, the dns routing is going to 8.8.8.8 and can't join to domain the second machine. So, I changed that to first machine hostonly network IP for the dns setting of 2nd machine nat network adapter. Then, I am able to join domain.But the result, I can't access internet from here in 2nd machine.
Also, can we keep the dns setting in the virtualbox configuration itself, instead of editing inside VM?
Please suggest.