virtualboxdhcp

Create DHCP Server Using VirtualBox's VBoxManage utility


I am creating a dhcp server using the following command.

VBoxManage dhcpserver add --netname dirtylan --ip 10.6.66.1 --netmask 255.255.255.0 --lower-ip=10.6.66.64 --upper-ip=10.6.66.128 --enable

When I list the dhcpservers using the following command

VBoxManage list dhcpservers

I see it is created as follows.

NetworkName: dirtylan Dhcpd IP: 10.6.66.1 LowerIPAddress: 10.6.66.64 UpperIPAddress: 10.6.66.128 NetworkMask: 255.255.255.0 Enabled: Yes Global Configuration: minLeaseTime: default defaultLeaseTime: default maxLeaseTime: default Forced options: None Suppressed opts.: None 1/legacy: 255.255.255.0 Groups: None Individual Configs: None

But it does not run. I also can not see it from the virtual machines' network settings and when I try to restart it using the following command

VBoxManage dhcpserver restart --netname dirtylan

I get the below error.

VBoxManage.exe: error: not running VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component DHCPServerWrap, interface IDHCPServer, callee IUnknown VBoxManage.exe: error: Context: "Restart()" at line 1063 of file VBoxManageDHCPServer.cpp VBoxManage.exe: error: Failed to restart server

I want to use this to create an internal network. I realized that it is not running when I manually entered its name "dirtylan" on the network config and the machine didn't get an IP.

I need help to fix this problem.

Kind Regards, Ferda


Solution

  • Rebooting the host did the magic for me