Ticket #6514 (new defect)
Host only interfaces and DHCP servers show strange behavior
|Reported by:||Sm0k1n||Owned by:|
|Version:||VirtualBox 3.1.6||Keywords:||host-only, interface, dhcp|
I am using the PHP web api to create a few host only interfaces and dhcp servers for them.
When I set them up properly the guest (Win XP) has no issues getting an IP from the dhcp server. However, any changes to the dhcp server configuration while the machine is running have no effect (I haven't tried using the cableConnected feature of the guest network adapter, but I disable/enable the connection from the guest so that should work). Those changes only appear after I stop and start the virtual machine, so maybe I am missing a neccessary step (note: restarting the guest w/o stopping the vm does not work either).
An odd thing is that under no circumstances does the state of the dhcp server make any difference. Disabling the server by using the IDHCPServer::stop() function does not seem to stop the server. Or it could be that this is supposed to do something completely different, but I can't really tell since there is almost no information about it in the API docs.
Another issue I have is when trying to enable dynamic configuration on the host only interface. As far as I can understand enabling that will allow a dhcp server to give an address to the interface. But what I get when I call
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] VirtualBox error: (0x0) in <...the stack trace..>
I get the same error when I try to call IHostNetworkInterface::dhcpRediscover(). All this could have something to do with the fact that there is no dhcp server that could handle the address allocation for these interfaces but there is nothing in the docs that explains how to add such s server.
Attempting to do all this using the CLI also got me nowhere because there is no info about the VBoxManage hostonlyif subcommand.
Am I missing something or is there something wrong here?