Bug 1191226

Summary: libvirt requires rtc-reset-reinjection command, backport it to RHEL7.1
Product: Red Hat Enterprise Linux 7 Reporter: Marcelo Tosatti <mtosatti>
Component: qemu-kvmAssignee: Marcelo Tosatti <mtosatti>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: hhuang, huding, juzhang, lmiksik, mprivozn, mrezanin, qzhang, rbalakri, scui, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-102.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 04:58:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcelo Tosatti 2015-02-10 18:19:43 UTC
libvirt refuses to support virDomainSetTime if QEMU's rtc-reset-reinjection is not supported.

The result is that mgmt applications fail to sync guests time.

Comment 2 Michal Privoznik 2015-08-20 01:04:15 UTC
Marcelo asked me to confirm whether this is needed. Yes it is. The idea is that virDomainSetTime() uses guest agent to set/sync guest time. In that case, we must reset RTC reinjection otherwise both correction techniques will be used resulting in guest time drifting again. Therefore, at the beginning of the API libvirt checks if qemu supports the monitor command and if not, whole API is rejected.

Comment 3 Miroslav Rezanina 2015-09-03 09:36:53 UTC
Fix included in qemu-kvm-1.5.3-102.el7

Comment 5 Shaolong Hu 2015-09-16 07:01:29 UTC
Reproduced on qemu-kvm-1.5.3-101.el7.x86_64:

{ 'execute' : 'qmp_capabilities' }
{"return": {}}

{ "execute": "rtc-reset-reinjection" }
{"error": {"class": "CommandNotFound", "desc": "The command rtc-reset-reinjection has not been found"}}



Verified on qemu-kvm-1.5.3-102.el7.x86_64:

1. boot guest
2. in qmp, run:

{ 'execute' : 'qmp_capabilities' }
{"return": {}}

{ "execute": "rtc-reset-reinjection" }
{"return": {}}

3. reboot guest, guest works correctly.

CMD:

/usr/libexec/qemu-kvm -enable-kvm -M pc -smp 4 -m 4G -name rhel6.3-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=/root/nfs/RHEL-Server-7.1-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=aa:54:00:11:22:33 -boot order=cd -monitor stdio -readconfig nfs/ich9-ehci-uhci.cfg -device usb-tablet,id=input0 -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -monitor tcp::1234,server,nowait -vga qxl -global qxl-vga.revision=3 -spice port=5920,disable-ticketing -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -vnc :10 -qmp tcp:0:5555,server,nowait

Comment 7 errata-xmlrpc 2015-11-19 04:58:27 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-2213.html