Often after upgrading to the latest version of VirtualBox, your VirtualBox settings are restored back to the factory default !
Wouldn’t it be great if you could restore your VirtualBox network settings from a simple batch file .. well you can !
In this example, my VirtualBox Host Only settings are :
1) The DHCP Server is switched off
2) The VirtualBox IP/Mask is 172.16.24.1 / 255.255.252.0
So, how to get those settings re-instated ? Copy the blue text into notepad, and save on the desktop as “restore-virtualbox.bat”
cd “C:\Program Files\Oracle\VirtualBox\”
rem # disable the VirtualBox Host Only DHCP Server …
VBoxmanage dhcpserver modify –netname “HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter” –disable
rem # set VirtualBox Host Only IP / Mask to 172.16.24.1/255.255.252.0
VBoxManage hostonlyif ipconfig “VirtualBox Host-Only Ethernet Adapter” –ip 172.16.24.1 –netmask 255.255.252.0
After you next upgrade VirtualBox, run the “restore-virtualbox.bat” you just saved and that’s your settings restored!