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!

vdm
  • 3
  • 1
user178127
  • 11
  • 3
  • 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 https://www.virtualbox.org/ticket/2928, but did not work. – user178127 Jun 18 '13 at 11:57

1 Answers1

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
derby
  • 41
  • 1