Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My current setup is an AMD server with proxmox VE (debian based hypervisor distro using KVM virtualization) and I'm running one debian and one windows server 2008 (not r2) as virtual machines.

Windows Server got some bad timing issues (the clock jumps around) that kill my application as I'm running a MMO game server with MsSQL. Also tried this on a Intel Xeon because proxmox support adviced me not to use an AMD server for Windows virtualization but it doesn't work either. The only way to get rid of this bug is to limit the VM to 1 CPU (of 2 (AMD) or 4 (Intel)) but then the whole VM is overallocated.

I'm looking for an alternative to KVM to run Windows Server as a VM on the AMD box. The problem is that this server is live and I don't have another server to try things out. I'll check if I have the same issues on a local PC.

I also want to test if this bug also occur in VirtualBox. I know that VBox is not suited for servers but if performs better than KVM and I can't find another way it's probably the way to go.

share|improve this question

4 Answers 4

there are lots of advances in KVM, and fortunately it's very easy to try new userspace tools without replacing the whole system. just download the sources, compile and run from a local directory. most of the advances are in the userspace tools, keeping the kernel module mostly unchanged, and more importantly, compatible.

I'm using a simple Ubuntu server (9.10, i think) installation with libvirt to handle several linux and windows guests using only the packages available on apt. no time-related problems at all.

share|improve this answer

Guest Time Keeping in Windows under KVM Virtualization:

Virtualization poses various challenges for guest time keeping. Generally - Guests using the Time Stamp Counter (TSC) as a clock source generally suffer timing problems as some CPUs do not have a constant Time Stamp Counter.

I believe this is what is happening to you.

To clarify for others reading this post - guest systems without accurate timekeeping may have issues with some networked applications and processes as the guest will run faster or slower than the actual time and fall out of synchronization.

KVM works around this issue by providing guests with a para-virtualized clock. Alternatively, some guests may use other x86 clock sources for their timing in future versions of those operating systems.

To determine if your CPU has a constant Time Stamp Counter run the following command:

$ cat /proc/cpuinfo | grep constant_tsc

If any output is given your CPU has the constant_tsc bit.

Chances are however yours does not - and thus the issues your running into - therefore another work around / alternative is to first turn off any power management in the BIOS - as well as in the KVM.

It is also important to note that Windows uses the both the Real-Time Clock (RTC) and the Time Stamp Counter (TSC).

Older systems such as Windows 2003 and XP use the boot.ini file however - The boot.ini file is no longer used from Windows Vista and newer.

Windows 2008, Vista and 7 Booot Configuration Editor:

Windows Vista, Windows Server 2008 and Windows 7 use the Boot Configuration Data Editor (bcdedit.exe) to modify the Windows boot parameters.

  1. Open the Windows guest.
  2. Open the Accessories menu of the start menu. Right click on the Command Prompt application, select Run as Administrator.
  3. Confirm the security exception, if prompted.
  4. Set the boot manager to use the platform clock. This should instruct Windows to use the PM timer for the primary clock source. The system UUID ({default} in the example below) should be changed if the system UUID is different than the default boot device.

    C:\Windows\system32>bcdedit /set {default} USEPLATFORMCLOCK on The operation completed successfully

Windows 2003 and XP Boot Configuration Edit:

If by chance you are looking at this post - but the issue exists on your Windows XP and/or Windows 2003 system add the following line to the Windows boot settings. In XP and Server 2003 Windows boot settings are stored in the boot.ini file. Add the following line to the boot.ini file:

/use pmtimer

I really hope this helps.

Blessings, Glenn Kelley

share|improve this answer
    
Thanks for your post. My CPU doesnot support constant_tsc. I don't know how to disable power management in KVM (and I don't have access to the host's BIOS). I already read about useplatformclock. I'm using a Windows 2008 x64 server (not R2, Vista-based). But it does not support useplatformclock in bcdedit. Checked that several times. Any idea? –  Eliasdx Nov 19 '10 at 15:21
    
can you chat w/ the host? –  Glenn Kelley Nov 20 '10 at 8:48

What version of ProxMox: 1.6 has some new kernels that may help - literally just introduced a few days ago

I am not experiencing time issues however on our windows vps' - have you peeked @ other alterntives - such as libvirt ?

share|improve this answer
    
just updated proxmox and the bug is still there. After a day the clock in windows is off by ~30 minutes. Also tried to use VirtIO as block device. Any idea? –  Eliasdx Nov 17 '10 at 22:14
    
1.7 is out ... might try that or ask proxmox just in case –  Glenn Kelley Dec 1 '10 at 18:46

dunno about proxmox, but running dozens of win2k8r2 servers on RHEL5.5 based KVM with no timing issues at all. all the VMs are assigned 2-4 CPUs

share|improve this answer
    
we run a bunch there as well - and don't see this in 1.6 or 1.7 of proxmox ... –  Glenn Kelley Dec 1 '10 at 18:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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