I have a 64-bit Ubuntu Server 9.10 (Karmic Koala) host with three uniprocessor guests; two also run 64-bit Ubuntu Server 9.10 and the third runs 64-bit Windows Server 2003. All three were created under and had been running under VMware Server 1.0.x until recently when I switched to VirtualBox 3.1.2. The only changes I made to the guests in switching from VMware to VirtualBox was to uninstall VMware Tools, install Guest Additions, and on the Windows guest I had to change the system disk from SCSI to IDE to get it to boot. I still have to get around to changing all of my virtual disks from SCSI to SATA, and potentially convert them from VMDK to VDI format (where applicable, I have a number of writethrough virtual disks backed by LVM logical volumes on the host), but I'm thinking that wouldn't be the cause of my problem.
Ironically, one of the reasons I ditched VMware is because the Windows guest ran fine but VMware Tools was unable to keep the clocks in sync on the Ubuntu guests. Now, with VirtualBox, I have the opposite problem: the clocks on the Ubuntu guests are perfect but the Windows guest's clock just won't stay in sync. The first version of VirtualBox I used was 3.1.2, and with that the Windows guest's clock was running fast. I found this thread which referenced this bug which stated that running v3.1.0 of Guest Additions was a workaround for this problem. I tried that, but that just caused my clock to run very slow instead.
3.1.4 supposedly fixed that bug, though after upgrading my clock is still all over the place. What seems to be happening is this: when I first boot up the Windows guest the clock is fine. However, as soon as it experiences any significant load, then the clock starts losing time and in fact the entire guest is "stuck" running slowly. As a test, what I did was to start playing a YouTube video in the guest and gradually increase the video resolution (360p => 480p => 720p); after each "step" the processor usage would increase, and the clock would start slowing down a tiny bit (it would get maybe as much as a second or two behind), but Guest Additions was still able to periodically resync. However, after running the following batch file...
Code: Select all
@echo OFF
:LOOP
goto :LOOP
So, something seems to be happening when that guest CPU hits 100% that permanently puts it into a time warp that even rebooting the guest won't fix. The other frustrating thing is that, for example, I rebooted the guest and host the other day, and after that the clock was running way fast. So, there's just no rhyme or reason to it and I just can't figure out what or where the problem is. I've tried doing a repair installation from the Windows CD and that didn't seem to help. I also tried using the HALu utility to change the guest's HAL from "ACPI Uniprocessor x64-based PC" to some other non-ACPI uniprocessor HAL, but after I rebooted it still came up with the same description. I've considered doing a complete reinstall of the virtual machine from scratch, but I don't want to go through all that work only for it to not fix anything. Is it possible that I'm having this issue because the virtual machine was migrated from VMware? Could ACPI or APIC be to blame? Any other ideas I could try? I was going to begrudgingly disable AMD's Cool 'n' Quiet in the host BIOS to see if that helped...but it turned out I had it disabled all along, so I guess processor frequency scaling can't be the culprit.
The following is the configuration of that Windows guest. By the way, I use VBoxHeadless to run all of my virtual machines.
Here's a section of a log file that seemed to be of use in other threads dealing with time synchronization issues:Name: Win2003x64
Guest OS: Windows 2003 (64 bit)
UUID: 052a9fe4-def3-41de-aed2-32bded420633
Config file: /VirtualMachines/VirtualBox/Machines/Win2003x64/Win2003x64.xml
Hardware UUID: 052a9fe4-def3-41de-aed2-32bded420633
Memory size: 2048MB
VRAM size: 8MB
Number of CPUs: 1
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
PAE: on
Time offset: 0 ms
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging: off
VT-x VPID: off
State: running (since 2010-02-22T04:18:07.866000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
I get a ton of lines like this in the log:00:00:02.565 TM: GIP - u32Mode=2 (AsyncTSC) u32UpdateHz=100
00:00:02.605 TM: cTSCTicksPerSecond=0x71c4bf8c (1 908 719 500) fTSCVirtualized=true fTSCUseRealTSC=false
00:00:02.605 TM: fMaybeUseOffsettedHostTSC=false TSCTiedToExecution=false TSCNotTiedToHalt=false
Thanks for the help.95:09:18.014 TM: Giving up catch-up attempt at a 60 001 861 296 ns lag; new total: 116 880 374 084 799 ns