vmfest
vmfest copied to clipboard
Make Ubuntu 10.10 64bit force a DHCP request upon boot
Some users are having issues with network interfaces in this images not correctly acquiring a IPv4 address via DHCP. I cannot reproduce the issue, but it seems that forcing a new DHCP request once the system is fully booted helps.
Add it in rc.local.
This was my secondary sticking point. As a workaround I switched to a GUI (vs headless) instance and manually restarted networking.
Remove the cached lease file here: http://manpages.ubuntu.com/manpages/karmic/man5/dhcpd.leases.5.html
I'm using this small script locally for the moment:
UUID=`VBoxManage list vms | tail -1 | cut -f 2 -d "{" | cut -f 1 -d "}"`
PW=superduper
VBoxManage guestcontrol exec $UUID "/bin/sh" --username user --password $PW --wait-for exit --wait-for stdout \
--arguments "-c \"echo 'echo $PW | sudo -S /etc/init.d/networking restart' > /tmp/t\""
VBoxManage guestcontrol exec $UUID "/bin/sh" --username user --password $PW --wait-for exit --wait-for stdout \
--arguments "/tmp/t"