Setup: a Windows laptop with a VirtualBox (Ubuntu) guest machine, running Open ESB, for developing WS-Notification demos.
A use-case: Moving the laptop from one location to another, requiring: pausing, hibernating, waking, switching from wireless to LAN connection, and resuming the virtual machine (which works, yay!).
A problem: However, when resuming the guest machine, it had the wrong date and time. Then trying the ntpdate command failed to fix this, due to the laptop’s different network setup.
A solution: create a script, for example in:
/usr/local/bin/myresume.sh
to compensate for this, with two commands:
#/bin/sh
dhclient
ntpdate ntp.ubuntu.com
(After running this, as root, the resumed guest machine was all set to go.)
Category: virtualbox
posted by Mike Wright on: September 10, 2008