VirtualBox

Ticket #6514 (new defect)

Opened 4 years ago

Last modified 4 years ago

Host only interfaces and DHCP servers show strange behavior

Reported by: Sm0k1n Owned by:
Priority: minor Component: network
Version: VirtualBox 3.1.6 Keywords: host-only, interface, dhcp
Cc: Guest type: other
Host type: Linux

Description

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

IHostNetworkInterface::enableDynamicIpConfig()

is this:

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?

Change History

comment:1 Changed 4 years ago by Sm0k1n

After further investigation it seems that the IDHCPServer::stop() function works, but starting the server again is another issue because there is absolutely no information about IDHCPServer::start(in wstring networkName, in wstring trunkName, in wstring trunkType). I assumed that the enabled attribute of IDHCPServer will have something to do with starting/stopping the server because it is not set as readonly but now it seems it does nothing.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use