I’ve been using VirtualBox for a while to do experiments that require machines clustering. In some cases, my VMs need to connect to a private network through a VPN client (eg: Cisco AnyConnect). It works most of the time but occasionally it does not. I was in the situation where I was ready for a demo, but all of the sudden, things felt apart around 30 minutes before the show because my VMs could not connect to the private network after a host reboot (forced) with the helpfulness unknown host
message .
So I’m running MacOS , VirtualBox 5
and here were the steps I took to bring my pieces back together
I’m putting here the “magic” command which saved my demo, just for a record for myself and in case the Force wants to challenge you with similar situation.
- Shutdown the VM(s)
$ sudo shutdown now
- Run
$VBoxManage modifyvm <my-vm-name> --natdnshostresolver1 on
- Start the VM(s)
- Take a deep breath and feel thankful, get ready for what’s next.
By the way, the demonstration went really well 🙂