DHCP server: is it necessary to reboot the VM?

Discussions about using Linux guests in VirtualBox.
Post Reply
ulello
Posts: 2
Joined: 17. Oct 2012, 19:09
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 12.04.1 LTS

DHCP server: is it necessary to reboot the VM?

Post 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?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

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

Post 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.
ulello
Posts: 2
Joined: 17. Oct 2012, 19:09
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 12.04.1 LTS

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

Post 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
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

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

Post 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?
Post Reply