8.33. VBoxManage dhcpserver

The "dhcpserver" commands allow you to control the DHCP server that is built into VirtualBox. You may find this useful when using internal or host-only networking. (Theoretically, you can enable it for a bridged network as well, but that will likely cause conflicts with other DHCP servers in your physical network.)

Use the following command line options:

The following additional parameters are required when first adding a DHCP server:

Finally, you must specify --enable or the DHCP server will be created in the disabled state, doing nothing.

After this, VirtualBox will automatically start the DHCP server for given internal or host-only network as soon as the first virtual machine which uses that network is started.

Reversely, use VBoxManage dhcpserver remove with the given --netname <network_name> or --ifname <hostonly_if_name> to remove the DHCP server again for the given internal or host-only network.

To modify the settings of a DHCP server created earlier with VBoxManage dhcpserver add, you can use VBoxManage dhcpserver modify for a given network or host-only interface name.