qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Thomas Løcke
Hey all,

I'm working on moving from a mixture of physical servers and
virtualized servers running on Virtualbox, to a pure KVM setup. But
I'm having some problems with my Windows XP guests in my test-setup.

This is the host I'm testing on:

CPU: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz
RAM: 8GB
2x320GB WD SATA disks (one for host OS and one for KVM guest images)
2x1GBs Intel nics (bonded)

Host OS is Slackware 13 with the following kernels: 2.6.29.6-huge,
2.6.29.6-generic, 2.6.33 and 2.6.33.1

qemu-kvm is 0.12.3

My Linux guests works like a charm. When they boot up I do a single
ntpdate -b europe.pool.ntp.org and after that the time stays in near
perfect sync with the host, with no ntpd running on the guests. My
Windows XP guests on the other hand drifts backwards in time,
especially when there's load on the guest, for example when I'm
copying a large file from my samba server to the Windows XP guest. The
guest can easily lose 10 minutes while copying a 600MB file. Or if I
start a few browsers and point them at some horrible flash heavy sites
and just let them sit there, then the VM also start losing a lot of
time real fast.

This is the commandline I use to start the Windows XP guests:

qemu-system-x86_64 -hda winxppro.raw -boot c -m 1024 -vnc :1 -k da
-smp 1 -localtime -daemonize -name qemu_winxppro,process=qemu_winxppro
-net nic,macaddr=de:ad:be:ef:00:01,model=rtl8139 -net tap -runas kvm

I use the same commandline for my Linux guests, except the nic is virtio.

I'm at my wits end. I've tried the -tdf option with no success. I've
tried setting various -rtc options with no success.

Could it be I'm missing some key-component in the kernel? Or is there
perhaps some dev version of qemu-kvm I could/should try?

According to some of the #kvm residents, this should just work (tm),
but I simply cannot make it happen.

Any and all advice are more than welcome.

:o)
/Thomas
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Zachary Amsden

On 03/17/2010 09:22 AM, Thomas Løcke wrote:

Hey all,

I'm working on moving from a mixture of physical servers and
virtualized servers running on Virtualbox, to a pure KVM setup. But
I'm having some problems with my Windows XP guests in my test-setup.

This is the host I'm testing on:

CPU: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz
RAM: 8GB
2x320GB WD SATA disks (one for host OS and one for KVM guest images)
2x1GBs Intel nics (bonded)

Host OS is Slackware 13 with the following kernels: 2.6.29.6-huge,
2.6.29.6-generic, 2.6.33 and 2.6.33.1

qemu-kvm is 0.12.3
   


qemu's been changing a lot, might be best to build from the actual git 
repository, which is 0.12.50 now.



My Linux guests works like a charm. When they boot up I do a single
ntpdate -b europe.pool.ntp.org and after that the time stays in near
perfect sync with the host, with no ntpd running on the guests. My
Windows XP guests on the other hand drifts backwards in time,
especially when there's load on the guest, for example when I'm
copying a large file from my samba server to the Windows XP guest. The
guest can easily lose 10 minutes while copying a 600MB file. Or if I
start a few browsers and point them at some horrible flash heavy sites
and just let them sit there, then the VM also start losing a lot of
time real fast.
   


What's your host CPU load get up to.  You only have a single core?


This is the commandline I use to start the Windows XP guests:

qemu-system-x86_64 -hda winxppro.raw -boot c -m 1024 -vnc :1 -k da
-smp 1 -localtime -daemonize -name qemu_winxppro,process=qemu_winxppro
-net nic,macaddr=de:ad:be:ef:00:01,model=rtl8139 -net tap -runas kvm

I use the same commandline for my Linux guests, except the nic is virtio.

I'm at my wits end. I've tried the -tdf option with no success. I've
tried setting various -rtc options with no success.
   


Including -rtc-td-hack ?

Could it be I'm missing some key-component in the kernel? Or is there
perhaps some dev version of qemu-kvm I could/should try?

According to some of the #kvm residents, this should just work (tm),
but I simply cannot make it happen.

Any and all advice are more than welcome.
   


As always, make sure you are running the latest and greatest modules, 
those matter even more than the kernel, and check for any warning 
messages in dmesg and qemu output.


Zach
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Thomas Løcke
On Wed, Mar 17, 2010 at 8:33 PM, Zachary Amsden zams...@redhat.com wrote:
 What's your host CPU load get up to.  You only have a single core?

Dual core.

If I only run a single Windows VM, the host load is pretty low. Sure
it goes up a bit when for example copying a file, but it's nothing
serious. It's not getting hammered in any way.

 Including -rtc-td-hack ?

Yup, tried that as per suggested by one of the #kvm users. Didn't fix
it. But come to think of it, I didn't change any of the other options.
Should I have dropped -localtime and/or -tdf options? I will try again
tomorrow.


 As always, make sure you are running the latest and greatest modules, those
 matter even more than the kernel, and check for any warning messages in
 dmesg and qemu output.


But don't the latest kvm modules come with the kernel? So if I compile
a new kernel, the kvm modules should be updated too, yes?

I will try the latest qemu-kvm.

/Thomas
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm 0.12.3, Slackware 13 host and Windows XP guest - time drift a lot

2010-03-17 Thread Zachary Amsden

On 03/17/2010 12:17 PM, Thomas Løcke wrote:

On Wed, Mar 17, 2010 at 8:33 PM, Zachary Amsdenzams...@redhat.com  wrote:
   

What's your host CPU load get up to.  You only have a single core?
 

Dual core.

If I only run a single Windows VM, the host load is pretty low. Sure
it goes up a bit when for example copying a file, but it's nothing
serious. It's not getting hammered in any way.

   

Including -rtc-td-hack ?
 

Yup, tried that as per suggested by one of the #kvm users. Didn't fix
it. But come to think of it, I didn't change any of the other options.
Should I have dropped -localtime and/or -tdf options? I will try again
tomorrow.
   


-rtc localtime

is required for Windows to get the proper RTC time, and -tdf should have 
no effect on Windows guests.


You might try

-rtc localtime,clock=host,driftfix=slew



   

As always, make sure you are running the latest and greatest modules, those
matter even more than the kernel, and check for any warning messages in
dmesg and qemu output.
 


But don't the latest kvm modules come with the kernel? So if I compile
a new kernel, the kvm modules should be updated too, yes?

I will try the latest qemu-kvm.
   


I use git://git.kernel.org/pub/scm/virt/kvm/kvm-kmod.git and track a 2.6 
kernel branch directly so I always have latest module source regardless 
of host kernel.


Zach
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html