I have VirtualBox installed on a Windows 8 host. I was using the VirtualBox DHCP server for a while, but now I'm trying to switch over to a DHCP server installed on one of the guests. The VirtualBox DHCP still seems to be supplying addresses.

I will use two specific guests and their status as an example here, one of them CentOS the other Ubuntu, so I'll just call them that here.

Initial environment before the change:

The VirtualBox DHCP was one I added (VBoxManage dhcpserver add with server IP CentOS was getting from it and Ubuntu was getting from it.

Recent Changes:

  1. Installed DHCP server on CentOS with range -, and a fixed entry for Ubuntu of
  2. Set static IP on CentOS.
  3. Removed the VBox DHCP server I had added earlier by doing a VBoxManage dhcpserver remove. VBoxManage list dhcpservers does verify that the DHCP server is gone.
  4. Completely restarted CentOS and then Ubuntu.


On CentOS, DHCP service is running. It gets its statically assigned IP address correctly. When I start up Ubuntu, it still gets If I do ifdown eth0, it get output DHCPRELEASE on eth0 to If I then do ifup eth0 it outputs that it is sending a DHCP discover, then DHCPREQUEST of on eth0 to, and that it gets a DHCPOFFER of from, then DHCPACK of from, after which I obviously have the address.

Question Reiterated

Why is Ubuntu still getting that address, and from Better yet, HOW is it getting it? Is the VBox DHCP server still running even though I did a dhcpserver remove and it's not in the list anymore? If it is still running somewhere, how do I get rid of it?

Some other tests I did

As an extra test, I did a VBoxManage dhcpserver add again to add a DHCP server with the same information as the one I had before. I created it without enabling it, verified it was in disabled state, restarted Ubuntu, got, enabled the VBox DHCP server, restarted Ubuntu, and I got this time. I disabled/enabled VBox DHCP a few times and, each time it was disabled or enabled, I did ifdown/ifup, and this was what happened then: sometimes it would get for each step (request/offer/ack/bound), and sometimes for each one, but sometimes it would request, get offered, but then get an ack of and then bind to, and sometimes the opposite of request, offer, ack, bind Then I removed the VBox DHCP server again, verified it's gone again, and I keep doing ifdown/ifup on Ubuntu and getting the same results as above: all 3's, all 2's, or 2/2/3/3, or 3/3/2/2 to the request/offer/ack/bind. Now maybe I have two VBox DHCP servers running invisibly somewhere... :(

As another test, I set the IP statically on Ubuntu, did ifdown/ifup, and it got the IP I set. I could even communicate with CentOS correctly since I set it to be in the same subnet. Switched it back to get IP from DHCP again, restarted the interface again, and it went back to the 10.10.10 stuff.

The contents of /etc/dhcp/dhcpd.conf on CentOS:

subnet netmask {
        option subnet-mask;
    host ubuntuserver {
        hardware ethernet 08:00:27:10:F0:B9;

Just in case anyone is wondering, yes I did boot up more guests as well, and yes the ones set to get from DHCP were getting from and getting an address in that range as well.

I cannot properly do my full test environment, which is supposed to be able to mimic a production environment, while the virtual network is in this state. If you can help me to kill the server, I would be very grateful.


Based upon the last line in http://zaidmunir.blogspot.in/2010/07/how-to-enabledisable-virtualboxs-dhcp.html

due to a bug in VBox the DHCP is not truly disabled till the time you restart the host machine (The machine on which VBox is running).

Have you tried this?

  • 1
    No need to restart the whole host, it suffices to reload the drivers. sudo vboxreload does the trick for me (using VirtualBox 5.1.26 on Linux). – Rob W Aug 27 '17 at 15:51
  • I don't recall, and I'm far removed from that project now so I cannot test any longer. Thanks though. I'll mark your answer as accepted since it is documented. – Loduwijk Jun 14 '19 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.