Change VirtualBox DHCP to issue 192.168.x.x adresses instead of 10.0.x.x adresses?

I have a VirtualBox (v4.1.8) VM that is automatically assigned with an IP in the 10.0.x.x range via DHCP.

Can I change it to use the 192.168.x.x range instead?


Solution 1:

Thanks to @RelaXNow, here is the answer to the question:

VBoxManage modifyvm  "NameOfVM" --natnet1 "192.168/16" 

Solution 2:

Providing I have understood the question, if you check chapter 6 of the manual it says:

In the VirtualBox graphical user interface, you can configure all these items in the global settings via "File" -> "Settings" -> "Network", which lists all host-only networks which are presently in use. Click on the network name and then on the "Edit" button to the right, and you can modify the adapter and DHCP settings.

enter image description here

Solution 3:

Yes it can be changed. There is documentation on it here:

http://www.virtualbox.org/manual/ch08.html#vboxmanage-dhcpserver

It's handled through the VBoxManage dhcpserver command.