Ticket #7242 (closed defect: obsolete)

Opened 9 years ago

Last modified 4 years ago

One of two MS W2K3 Std Srv Guests is loosing time - Debian Linux Host v5.0.4 x64

Reported by: pfaf Owned by:
Component: other Version: VirtualBox 3.2.6
Keywords: time lag Cc:
Guest type: Windows Host type: Linux

Description (last modified by frank) (diff)

I have setup VirtualBox-OSE 3.2.4 on a 64-bit Debian Host with kernel 2.6.26 with an Intel(R) Xeon(R) CPU E5504 @ 2.00GHz

# uname -a Linux machVM1 2.6.26-2-amd64 #1 SMP Tue Jan 12 22:12:20 UTC 2010 x86_64 GNU/Linux

which runs two W2K3 32bit guest machines (A) and (B). Guest (B) is now the domain controller and machine (A) is only a member server. The host server is also a SAMBA server connected as a member server of the formed windows AD domain.

Guest machine (A) is running SQL Server Express, Terminal Services, Print services, and McAfee VirusScan Enterprise v8.5i while Guest machine (B) is running AD services, DHCP, DNS and Print Services.

On both machines I have Guest Additions v3.2.4 installed and on both machines the windows time service (w32time) runs. On both machines the ntp service runs as NT5DS. This sets machine (A) to try to synchronize with the domain controller which is machine (B).

On machine (B) time is always in sync with the host. It happens that both are from time to time out of sync then after a while - less that 5 minutes - the clocks are in sync again. I think that this is due to VB Guest Additions.

The problem is that (A) starts to loose time after 12 hours when the machine is first powered on. Then, even if I restart the machine (A) OS the clock always looses time immediately. If I poweroff machine (A) and power it on again then I get the 12 hour grace time of synced clocks.

I have setup a notification service which reads the time from the 3 machines (A,B and host) via the "net time" linux command and compares it to the host time. After 12 hours have passed the clock starts to drift, until the difference is about 1200 seconds (20 minutes) and then it is automatically corrected.

Since restart of the guest OS does not fix the problem, while poweroff fixes it, I believe it is a VirtualBox problem.

I have compared the machine .xml files and could not find any difference that could be the cause of such problematic time behaviour. In fact I have applied all the differences of the .xml files from machine (B) to machine (A) I could think that should be responsible for such a behaviour but the issue has not been fixed.


LinuxHost.tar.gz Download (43.0 KB) - added by pfaf 9 years ago.
VBox logs & Machine XML files
machA.log Download (42.7 KB) - added by pfaf 9 years ago.
machA.xml Download (9.9 KB) - added by pfaf 9 years ago.

Change History

Changed 9 years ago by pfaf

VBox logs & Machine XML files

Changed 9 years ago by pfaf

comment:1 Changed 9 years ago by pfaf

I have also updated to VirtualBox v3.2.6 both the Debian Host and the W2K3 Guest Additions but the problem still remains.

I have searched a lot of posts and I tried to set the TSCTicksPerSecond parameter to what machine B had. So with Machine (A) powered off I issued the command: VBoxManage setextradata "MachSrv" "VBoxInternal/TM/TSCTicksPerSecond" 1991875832

This changed MaybeUseOffsettedHostTSC to false.

I tried to change it back to true without success.

Then I noticed that when I powered on the server, it begins loosing time almost immediately.

Is there a way to reset the TSCTicksPerSecond so that MaybeUseOffsettedHostTSC is changed back to true?

What can I do to have the clocks of the Host and Machine (A) synchronized?

The new log & xml files are MachA.log and MachA.xml

Changed 9 years ago by pfaf

comment:2 Changed 9 years ago by pfaf

LinuxHost.tar.gz are the log & xml files of the two machines (A) & (B) when I used to have v3.2.4 for both host and guests - before I set TSCTicksPerSecond to 1991875832.

Then I upgraded to v3.2.6 and the time still changed on Machine (A) after 12 hours of power-up. I had to power-off and then power-up again to get the 12 hours of synced clocks.

Then I changed TSCTicksPerSecond to 1991875832 and noticed that Machine (A) was almost immediately loosing time.

Check also the following post...

comment:3 Changed 8 years ago by mschmid

I observe more or less the same while just running one W2K3/32 guest on a debian lenny 64. The host has a 3 core AMD CPU and the guest runs with all three cores. I see the guest running in sync for some time and then loosing time extremely quickly. The clock may be up 40 seconds behind after just one minute! I've disabled PowerNow! completely (governer set to 'performance'), which did not help. I've also tried playing with all TSC settings but without observing any change at all. It seems that VB gets to a point where the whole sync gets out of control no matter what settings there are. I currently use a --timesync-set-threshold of 2000 to keep the server running within Kerberos needs but even so, the clock is up to 40s away of sync and still causing spurious connection timeouts when hard resynced. Looking back I'd say that the whole problem arose after changing fom Linux/32 to Linux/64. Before, the guest ran under Windows 2000 server for more than a year without problems. And I would also argue that W2K also sufferd from clock problems under the Linux/64 host. It was the constantly high CPU load that lead to the upgrade to W2K3. And since then that sync problem became much worse and a major issue.

Would logs be of any help?

comment:4 Changed 8 years ago by pfaf

Try the latest version of virtual box...

comment:5 Changed 8 years ago by mschmid

Sorry that I didn't mention this: of course I've the latest version running. It's the 3.2.10r66523, the guest box additions are of the same version and to be sure, I've checked the version of the service file in the System32 folder. And I've also restarted the whole server just to make sure that no old parts of software are running. Uname -a says: 'Linux odin 2.6.32-bpo.5-amd64 #1 SMP Fri Aug 27 10:59:24 UTC 2010 x86_64 GNU/Linux'.

comment:6 Changed 8 years ago by mschmid

Two interesting details:

  • There are hints around to use the /usepmtimer option in the boot.ini of the windows guest. I don't see any change using this option.
  • I've tried using KVM. There's almost exacly the same bahaviour.

I do not understand, why the clock is in sync for a while under VirtualBox. There must be measures in place that potentially work but fail after a while.

comment:7 Changed 8 years ago by mschmid

Now, I'm completely puzzled: when I set --timesync-set-threshold 200 and --timesync-interval 500 how can it be that the clock runs 50 seconds wrong? Are all settings ignored?

comment:8 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to obsolete
  • Description modified (diff)
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use