1

whenever I try to set the date from either the command line, or using the Settings window, the new value is always reverted after a few seconds.

I have tried many things: e.g.

date 062120002013.00

This gives me the future date I want of Fri Jun 21 20:00:00 IST 2013.

However, 1 second later running the date command gives me the current time again (not the future time I need to have):

Mon Jun 17 17:45:00 IST 2013

Also

hwclock --set --date="2013-06-21 20:00:00"

and

hwclock -s

will not result in a future date and time being kept on the system - the date and time keep reverting.

I don't have ntp on the system.

Thanks Paul

UPDATE:

I have tried /etc/init.d/vboxadd-service stop and also /usr/sbin/VBoxService --disable-timesync

Same problem - the time gets re-synced after 5 seconds.

ANSWER:

OK, I tried all the options on this page again, and at the second try what worked was this:

Editing /etc/init.d/vboxadd-service to have --disable-timesync added to it, and restarting that service. Find line starting with daemon in start() function and change it like this:

daemon $binary --disable-timesync > /dev/null

I don't know why it didn't work first time around, possible it needed one of the other many tweaks I made also.

Thanks for all the help!

  • are you running a physical or is it a VM? a lot of hypervisors sync time between "dom0" and virtual guest. Could this be the case for you? – Petter H Jun 17 '13 at 17:18
  • Hi Petter, yes it is a VM. I bet that is what it is, because the sync is happening so quickly. How would I disable the sync between dom0 and the virtual guest? – user178127 Jun 18 '13 at 11:38
  • 1
    if you're on Xen you can try: echo 1 > /proc/sys/xen/independent_wallclock – Adrian Perez Jun 18 '13 at 11:52
  • I'm using Virtualbox. I also tried editing /etc/init.d/vboxadd-service as per virtualbox.org/ticket/2928, but did not work. – user178127 Jun 18 '13 at 11:57
4

from http://www.virtualbox.org/manual/ch09.html#disabletimesync

Disabling the Guest Additions time synchronization Once installed and started, the VirtualBox Guest Additions will try to synchronize the guest time with the host time. This can be prevented by forbidding the guest service from reading the host clock:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
  • Hi,I tried that now on the Windows host, restarted the linux guest, but still the date gets re-synced. I don't have any hair left at this stage, this is ridiculous. – user178127 Jun 18 '13 at 13:38
  • I can confirm it helps! It was a lifesaver. – Aron Lorincz Sep 25 '15 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.