Windows time drifting with Qemu/KVM

kvm, libvirt, qemu

Solution

This did the trick for me:

<clock offset='localtime'>
  <timer name='rtc' tickpolicy='catchup' track='guest'/>
  <timer name='pit' tickpolicy='delay'/>
  <timer name='hpet' present='no'/>
</clock>

you also need to make sure Windows uses the platformclock when booting:

bcdedit /set USEPLATFORMCLOCK on

Problem

I have a Windows VM running with kvm/qemu which is experiencing time drift. What would be the optimal libvirt settings for a Windows guest? Currently I am using this, but it did not help: ``` <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup' track='guest'> <catchup threshold='123' slew='120' limit='10000'/> </timer> </clock> ```

Original source