$Date: 2019-07-08 23:33:59 +0000 (Mon, 08 Jul 2019) $VBoxManage dhcpserverVBoxManage-dhcpserver1VBoxManage-dhcpserverDHCP server managementOracle VM VirtualBoxVBoxManage dhcpserver add--network=netname--interface=ifname--ip=dhcpd-address--netmask=mask--lower-ip=address--upper-ip=address--enable--disable--global--add-opt=dhcp-opt-no hex-string--vm=name|uuid--nic=1-N--add-opt=dhcp-opt-no hex-stringVBoxManage dhcpserver modify--network=netname--interface=ifname--ip=dhcpd-address--netmask=mask--lower-ip=address--upper-ip=address--enable--disable--global--del-opt=dhcp-opt-no--add-opt=dhcp-opt-no hex-string--vm=name|uuid--nic=1-N--del-opt=dhcp-opt-no--add-opt=dhcp-opt-no hex-stringVBoxManage dhcpserver remove--network=netname--interface=ifnameVBoxManage dhcpserver restart--network=netname--interface=ifnameVBoxManage dhcpserver findlease--network=netname--interface=ifname--mac-address=macDescription
The dhcpserver commands enable 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 also
enable it for a bridged network, but that may cause conflicts with other
DHCP servers in your physical network.
Common optionsThe subcommands of dhcpserver all operate on an
internal network that can be identified via its name or in the host-only
case via the host-only interface name:--network=netnameThe internal network name. This is the same as you
would use as value to the VBoxManage modifyvm --intnet
option when configuring a VM for internal networking. Or you see as
VBoxNetworkName in the output from
VBoxManage list intnets,
VBoxManage list natnets, or
VBoxManage list hostonlyifs.
--interface=ifnameThe host only interface name. This would be same value
as you would use for the VBoxManage modifyvm --hostonlyadapter
option when configuring a VM to use a host-only network. The value
can also be found in the Name row in VBoxManage list hostonlyifs.
dhcpserver add
Adds a new DHCP server to a network or host-only interface.
The IP address the DHCP server should use.The network mask. Typically 255.255.255.0., The IP address range for the DHCP server to manage. This
should not include the address of the DHCP server itself, but it must be
in the same network as it is. The boundraries are inclusive, so both the
lower and upper addresses will be handed out to clients., --disableWhether to enable the DHCP server or disable it. If not specified,
the server will be created in disabled state and no IP addresses handed out.Set the option scope to global. Any subsequent
options will be apply to all the DHCP clients.Set the option scope to the first NIC of the specified VM. Any
subsequent options will apply just to that interface,
nothing else.Set the option scope to a NIC other than first of the VM specified
the in .Adds the specified DHCP option number (0-255) and value. The scope of
the option is decided by the and options.
dhcpserver modify
This modifies an existing DHCP server configuration. It takes the same
options as the add command with the addition of:
Counterpart to that will cause the specified
DHCP option number (0-255) to be deleted from the server settings. Like with
the scope of the deletion is governed by the
and options.
dhcpserver remove
Removes the specified DHCP server.
dhcpserver restart
Restarts the specified DHCP server. The DHCP server must be running.
dhcpserver findlease
Performs a lease database lookup. This is mainly for getting the IP
address of a running VM.
The MAC address to lookup in the lease database.