Windows XP guest - clock keeps getting reset.

Discussions about using Windows guests in VirtualBox.
Post Reply
sproket
Posts: 7
Joined: 28. May 2008, 13:56

Windows XP guest - clock keeps getting reset.

Post by sproket »

Hi All,

I'm testing something where I need to put the clock at Dec 31. 2009 but whenever I do that the clock keeps getting reset back to "Now".

I have the clock settings to not use Internet time and not to adjust for daylight savings.

I'm using VBOX 3.08 with Windows XP guest with guest additions.

Any ideas why?

TIA
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Windows XP guest - clock keeps getting reset.

Post by Perryg »

You might be able to uninstall the guest additions and have it work. TimeSync is in the GA's AFAIK
sproket
Posts: 7
Joined: 28. May 2008, 13:56

Re: Windows XP guest - clock keeps getting reset.

Post by sproket »

Thanks! That worked.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Windows XP guest - clock keeps getting reset.

Post by MarkCranness »

Rather than totally disable all Guest Addition features, you can just disable the time sync function.
You can turn the VirtualBox timesync off, but sometimes the VM then doesn't keep very good time and slips (it might only report 40 seconds of elapsed for every 60 seconds of elapsed real time, or it might be OK).

Or you can apply an offset to the time sync, so that the VM runs hours, days, years etc behind the host, but still maintains time sync.

Disable GA time-sync by editing the parameters passed to the VirtualBox Guest Additions Service (on Windows guests):
  • Open Registry Editor (Start menu>Run...>Type 'regedit' into the 'Open:' field>Click the OK button)
    WARNING: Incorrect editing of the registry can damage your system.
  • Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxService
  • Double-click on 'ImagePath'
  • Change the 'Value data:' field to:

    Code: Select all

    system32\VBoxService.exe --disable-timesync
  • Click OK
  • Either reboot the VM, or stop and then restart the 'VirtualBox Guest Additions Service'
    To restart the 'VirtualBox Guest Additions Service':
  • Right-click 'My Computer' on the desktop and select 'Manage'
  • Expand 'Services and Applications' and select 'Services'
  • Find service: 'VirtualBox Guest Additions Service' in the list
  • Right-click>Properties
  • Click 'Stop' button
  • Click 'Start' button
After these steps, timesync will be disabled.
To reenable timesync, repeat the steps but remove the --disable-timesync parameter.

Keywords: time clock sync synchronisation synchronization

OR A time offset can be set using:

Code: Select all

VBoxManage modifyvm "My VM" --biossystemtimeoffset <msec>
... this should set the VM clock to be in sync with the host clock, but <msec> (milliseconds) offset. Negative numbers put the VM clock in the past, positive numbers put the VM into the future.
Last edited by MarkCranness on 12. Jan 2010, 07:34, edited 1 time in total.
sproket
Posts: 7
Joined: 28. May 2008, 13:56

Re: Windows XP guest - clock keeps getting reset.

Post by sproket »

Thanks! Good to know.
Post Reply