Ubuntu – How to stop the clock running fast on a virtualbox client running ubuntu 8.04

ntpntpdtimeUbuntuvirtualbox

I'm having a problem with the clock running fast in Ubuntu 8.04 server (2.6.24-24-generic kernel) running in VirtualBox 3.04.

It's drifting quickly, something like 5 minutes per hour.

I think it was working fine until I upgraded to VirtualBox 3.04 (from 2.something). I had ntpd running and the only thing I had to do was /etc/init.d/ntp stop, ntpdate ..., /etc/init.d/ntp start when the virtual machine was suspended/resumed.

Today, I've tried installing the VirtualBox Guest Additions, and they're running (according to /etc/init.d/vboxadd status.)

Running vboxadd-service --foreground --verbose
Results in:

vboxadd-service: Starting 'timesync' in the main thread
vboxadd-service: adjtime by -380331911000 ns
vboxadd-service: adjtime by -381107064000 ns
vboxadd-service: adjtime by -381883899000 ns

Which looks like it's trying, but failing, to update the time.

So, I'm not sure what to do, I can't find any consensus on whether ntpd should be running or not? And if not, how do I stop it from starting up again on reboot?

Best Answer

This was a know issue in VirtualBox, resolved by installing the Guest Additions on the Virtual Machine to manage the TimeSync. Their was a similiar problem with VMWare a while back as well. This is just one of the times it was reported for VirtualBox.

Ensure you are running the latest guest additions and it is the latest version provided with your version of VirtualBox.