To achieve this you can setup DNS Proxy Mode using the host's resolver with the following command:
VBoxManage modifyvm "VM name" --natdnshostresolver1 on
As the result, guest OS DNS requests will be intercepted and resolved using host DNS API,
rather than having guest OS connect to external DNS servers as with --netdnsproxy1 on
.
You can get the name of the VM by running VBoxManage list runningvms.