Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/add-no-hpet-option-into-guest-clock. Description: Since havana, the timezone of windows vm is localtime. However, there is a time drifting when the windows vm is got overload. We need to add --no-hpet option into libvirt xml configuration. From this template, <clock offset='utc'> <timer name='pit' tickpolicy='delay'/> <timer name='rtc' tickpolicy='catchup'/> </clock> To this template, <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup' track='guest'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> Specification URL (additional information): None
Code has been reviewed upstream, should be committed shortly.
Tested with IceHouse RDO: http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/ Environment : -------------- libvirt-0.10.2-29.el6_5.5.x86_64 openstack-nova-2014.1-0.11.b3.el6.noarch booting instances and checking it libvirt.xml: ----------------------------------------------- cat /var/lib/nova/instances/1b8291c6-d445-4d40-897d-e7dea11df6a0/libvirt.xml | less <clock offset="utc"> <timer name="pit" tickpolicy="delay"/> <timer name="rtc" tickpolicy="catchup"/> <timer name="hpet" present="no"/> </clock>
Can you check if that sufficient ? https://bugzilla.redhat.com/show_bug.cgi?id=1045805#c4
Original description also adds track='guest' for rtc timer and this is not set in the actual libvirt xml. If not present, hypervisor default applies, which is qemu -rtc clock=host [1] i.e. track='wall' [2] while track='guest' is mapped to qemu -rtc clock=vm [1] http://git.qemu-project.org/?p=qemu.git;a=blob;f=vl.c#l3003 [2] http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_command.c#l6552
@apevec: that part is not actually in the linked qemu discussion post [1], however. Perhaps @danpb will know? [1] http://www.redhat.com/archives/libvir-list/2010-June/msg00192.html
The original XML in the blueprint/bug description was not correct. Since this bug was about disabling hpet, changing any other attribute on other timers was out of scope.
That's what I figured. Looks like we're all set here, then.
Can we test it by boot instance and check the libvirt.xml ? If so according to https://bugzilla.redhat.com/show_bug.cgi?id=1045805#c4 - this ticket can be verified.
Yes, it should be sufficient to do a `virsh dumpxml` after booting an instance. If you want to be extra sure, you can check the qemu command line to make sure it got run with '--no-hpet'.
(In reply to Solly Ross from comment #12) > Yes, it should be sufficient to do a `virsh dumpxml` after booting an > instance. > > If you want to be extra sure, you can check the qemu command line to make > sure it got run with '--no-hpet'. Maybe I'm missing something , I don't see --no-hpet on the qemu command line ? Version: -------- libvirt-0.10.2-29.el6_5.5.x86_64 openstack-nova-2014.1-0.11.b3.el6.noarch ps -ef | grep qemu -------------------- qemu 28333 1 4 Apr01 ? 1-01:20:11 /usr/libexec/qemu-kvm -name instance-00000028 -S -M rhel6.5.0 -cpu SandyBridge,+pdpe1gb,+osxsave,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -enable-kvm -m 2048 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 317f3ccf-01eb-4900-993d-db61d5b6484a -smbios type=1,manufacturer=Red Hat Inc.,product=OpenStack Nova,version=2014.1-0.11.b3.el6,serial=b94ddc48-ad22-f43a-a45f-7bfb6ea82174,uuid=317f3ccf-01eb-4900-993d-db61d5b6484a -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-00000028.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/nova/instances/317f3ccf-01eb-4900-993d-db61d5b6484a/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=28 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:a3:0c:7a,bus=pci.0,addr=0x3 -chardev file,id=charserial0,path=/var/lib/nova/instances/317f3ccf-01eb-4900-993d-db61d5b6484a/console.log -device isa-serial,chardev=charserial0,id=serial0 -chardev pty,id=charserial1 -device isa-serial,chardev=charserial1,id=serial1 -device usb-tablet,id=input0 -vnc 10.0.0.3:2 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 [root@rhos-compute-node-03 ~]# cat /proc/28333/cmdline --------------------------------------------------------- /usr/libexec/qemu-kvm-nameinstance-00000028-S-Mrhel6.5.0-cpuSandyBridge,+pdpe1gb,+osxsave,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme-enable-kvm-m2048-realtimemlock=off-smp1,sockets=1,cores=1,threads=1-uuid317f3ccf-01eb-4900-993d-db61d5b6484a-smbiostype=1,manufacturer=Red Hat Inc.,product=OpenStack Nova,version=2014.1-0.11.b3.el6,serial=b94ddc48-ad22-f43a-a45f-7bfb6ea82174,uuid=317f3ccf-01eb-4900-993d-db61d5b6484a-nodefconfig-nodefaults-chardevsocket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-00000028.monitor,server,nowait-monchardev=charmonitor,id=monitor,mode=control-rtcbase=utc,driftfix=slew-no-kvm-pit-reinjection-no-shutdown-devicepiix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2-drivefile=/var/lib/nova/instances/317f3ccf-01eb-4900-993d-db61d5b6484a/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none-devicevirtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1-netdevtap,fd=25,id=hostnet0,vhost=on,vhostfd=28-devicevirtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:a3:0c:7a,bus=pci.0,addr=0x3-chardevfile,id=charserial0,path=/var/lib/nova/instances/317f3ccf-01eb-4900-993d-db61d5b6484a/console.log-deviceisa-serial,chardev=charserial0,id=serial0-chardevpty,id=charserial1-deviceisa-serial,chardev=charserial1,id=serial1-deviceusb-tablet,id=input0-vnc10.0.0.3:2-ken-us-vgacirrus-devicevirtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5[root@rhos-compute-node-03 ~]# less /var/lib/nova/instances/317f3ccf-01eb-4900-993d-db61d5b6484a/libvirt.xml ------------------------------------------------------------------------------ </features> <clock offset="utc"> <timer name="pit" tickpolicy="delay"/> <timer name="rtc" tickpolicy="catchup"/> <timer name="hpet" present="no"/> </clock> <cpu mode="host-model" match="
Rather than just too focused on CLI args to QEMU, the more important thing is whether /sys/devices/system/clocksource/clocksource0/available_clocksource contains 'hpet' according to the XML config. ie if hpet is disabled, it shouldn't show up as a clock source, and if enabled them it should show up
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0853.html