Take the 2-minute tour ×

I have Ubuntu Server running as a guest on a Windows host using VirtualBox 3. The Ubuntu Server has guest additions installed.

To save a bit of time when I use this image, I suspend rather than shutting down. This works fine except for the date of the clock on the guest machine.

Is there a command I can run on the guest once it has been restored to force it to set the clock from the underlying host?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

If you route Internet connection to the guest OS, you may use ntpdate to sync it's clock with special time servers, e.g.

sudo ntpdate ntp.ubuntu.com
share|improve this answer
I'm afraid that won't work for me because of the nature of my setup (ntpdate isn't installed on the machine and no regular internet access). That's why I took the trouble to install Guest Additions, so that the guest could get at the host's clock. Sadly it seems to only access it on a full initialisation of the client VM - rebooting the client OS isn't good enough. –  Rich Jan 19 '11 at 15:31
add comment

My apologies for bumping a 1,5 year old question which is, in my opinion, partly answered.

Since you have a windows host, you can make sure you have a ntp server running locally: http://blogs.msdn.com/b/w32time/archive/2008/04/02/configuring-a-standalone-time-server.aspx Then from within your linux client (when running NAT, is the host address) ntpdate

I was looking for the answer myself and found this useful as our firewall blocks the default ntp port.

share|improve this answer
add comment

Your Answer


