Page 1 of 1

DHCP server: is it necessary to reboot the VM?

Posted: 17. Oct 2012, 19:14
by ulello
I want to use the DHCP server included in VirtualBox.
I installed it executing

Code: Select all

VBoxManage dhcpserver add --netname intnet1 --ip 192.168.1.10 --netmask 255.255.255.0 --lowerip 192.168.1.50 --upperip 192.168.1.100 --enable
and so I edited the

Code: Select all

/etc/network/interfaces
with the following lines

Code: Select all

auto eth0
iface eth0 inet dhcp
, where eth0 is the active ethernet interface.

Then, if I use

Code: Select all

ifdown eth0
and then

Code: Select all

ifup eth0
, it doesn't work.
I'm forced to reboot in order to make the dhcp configuration.

Is it right?

Re: DHCP server: is it necessary to reboot the VM?

Posted: 18. Oct 2012, 11:23
by mpack
Not enough information. You want to use the VBox DHCP server in what capacity? I assume you're aware that it's only useful on virtual networks (internal or host-only), not on real networks (where it would conflict)?

I've never used the feature, but the user manual wording in s8.35 seems to imply that the server is initialized when the VM starts. If so then yes that would mean a complete shutdown, then restart the VM.

Re: DHCP server: is it necessary to reboot the VM?

Posted: 18. Oct 2012, 14:27
by ulello
Sorry.

I want to use the DHCP server on a virtual internal network.
I also read the manual and I came to the same conclusion, but I would just like a confirm! :D

Re: DHCP server: is it necessary to reboot the VM?

Posted: 18. Oct 2012, 14:53
by mpack
The command seems to make a permanent change to the VM configuration, so does it really matter if the config doesn't take effect until the next VM start?