Bug 1172583

Summary: [Power KVM] Qemu monitor command don't support {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}
Product: Red Hat Enterprise Linux 7 Reporter: Gu Nini <ngu>
Component: qemu-kvm-rhevAssignee: David Gibson <dgibson>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: bugproxy, dgibson, fnovak, knoel, mazhang, michen, mrezanin, qzhang, sherold, virt-maint, xuhan, ypu
Target Milestone: rc   
Target Release: 7.2   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.2.0-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-04 16:23:35 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:

Description Gu Nini 2014-12-10 12:26:17 UTC
Description of problem:
When execute {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}} in the qemu monitor cmmand line, it's found not supported

Version-Release number of selected component (if applicable):
Host kernel:3.10.0-201.el7.ppc64
Guest kernel:3.10.0-195.el7.ppc64/3.10.0-196.ael7a.ppc64le
Qemu-kvm version:
qemu-img-rhev-2.1.2-14.el7.ppc64
qemu-kvm-tools-rhev-2.1.2-14.el7.ppc64
qemu-kvm-common-rhev-2.1.2-14.el7.ppc64
qemu-kvm-rhev-2.1.2-14.el7.ppc64
qemu-kvm-rhev-debuginfo-2.1.2-14.el7.ppc64

How reproducible:
100%

Steps to Reproduce:
1.Start a guest with following command:
/usr/libexec/qemu-kvm -machine accel=kvm -name rhel7.1-1 -m 16384 -realtime mlock=off -smp 32,sockets=1,cores=4,threads=8 -uuid 95346a10-1828-403a-a610-ac5a52a29428 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel7.1-1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=2006-06-06,clock=host,driftfix=slew -no-shutdown -boot strict=on -device usb-ehci,id=usb,bus=pci.0,addr=0x2 -device pci-ohci,id=usb1,bus=pci.0,addr=0x1 -device spapr-vscsi,id=scsi0,reg=0x1000 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/home/ngu/rhel7.1-1.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown -device spapr-vlan,netdev=hostnet0,id=net0,mac=52:54:00:c4:e7:24,reg=0x2000 -device usb-kbd,id=input0 -device usb-mouse,id=input1 -vnc 0:14 -device VGA,id=video0,bus=pci.0,addr=0x4 -msg timestamp=on

2.Connect to its monitor with command "nc -U /var/lib/libvirt/qemu/rhel7.1-1201-1.monitor" in the host
3.Execute {"execute":"qmp_capabilities"} in above monitor connection
4.Then execute {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}} in above monitor connection

Actual results:
{"error": {"class": "GenericError", "desc": "Property '.rtc-time' not found"}}

Expected results:
{"return":{"tm_year":114,"tm_sec":16,"tm_hour":11,"tm_min":51,"tm_mon":11,"tm_mday":10} as that in x86_64 system


Additional info:
Following is a full cmd line output:
[root@ibm-p8-kvm-01-qe ~]# nc -U /var/lib/libvirt/qemu/rhel7.1-1.monitor
{"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 2}, "package": " (qemu-kvm-rhev-2.1.2-14.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"query-commands"}
{"return": [{"name": "query-acpi-ospm-status"}, {"name": "query-memory-devices"}, {"name": "query-memdev"}, {"name": "query-named-block-nodes"}, {"name": "blockdev-add"}, {"name": "query-rx-filter"}, {"name": "chardev-remove"}, {"name": "chardev-add"}, {"name": "query-tpm-types"}, {"name": "query-tpm-models"}, {"name": "query-tpm"}, {"name": "query-target"}, {"name": "query-cpu-definitions"}, {"name": "query-machines"}, {"name": "device-list-properties"}, {"name": "qom-list-types"}, {"name": "change-vnc-password"}, {"name": "nbd-server-stop"}, {"name": "nbd-server-add"}, {"name": "nbd-server-start"}, {"name": "qom-get"}, {"name": "qom-set"}, {"name": "qom-list"}, {"name": "query-block-jobs"}, {"name": "query-balloon"}, {"name": "query-migrate-capabilities"}, {"name": "migrate-set-capabilities"}, {"name": "query-migrate"}, {"name": "query-command-line-options"}, {"name": "query-uuid"}, {"name": "query-name"}, {"name": "query-vnc"}, {"name": "query-mice"}, {"name": "query-status"}, {"name": "query-kvm"}, {"name": "query-pci"}, {"name": "query-iothreads"}, {"name": "query-cpus"}, {"name": "query-blockstats"}, {"name": "query-block"}, {"name": "query-chardev-backends"}, {"name": "query-chardev"}, {"name": "query-events"}, {"name": "query-commands"}, {"name": "query-version"}, {"name": "human-monitor-command"}, {"name": "qmp_capabilities"}, {"name": "add_client"}, {"name": "expire_password"}, {"name": "set_password"}, {"name": "block_set_io_throttle"}, {"name": "block_passwd"}, {"name": "query-fdsets"}, {"name": "remove-fd"}, {"name": "add-fd"}, {"name": "closefd"}, {"name": "getfd"}, {"name": "set_link"}, {"name": "balloon"}, {"name": "change-backing-file"}, {"name": "drive-mirror"}, {"name": "blockdev-snapshot-delete-internal-sync"}, {"name": "blockdev-snapshot-internal-sync"}, {"name": "blockdev-snapshot-sync"}, {"name": "transaction"}, {"name": "block-job-complete"}, {"name": "block-job-resume"}, {"name": "block-job-pause"}, {"name": "block-job-cancel"}, {"name": "block-job-set-speed"}, {"name": "drive-backup"}, {"name": "block-commit"}, {"name": "block-stream"}, {"name": "block_resize"}, {"name": "object-del"}, {"name": "object-add"}, {"name": "netdev_del"}, {"name": "netdev_add"}, {"name": "query-dump-guest-memory-capability"}, {"name": "dump-guest-memory"}, {"name": "client_migrate_info"}, {"name": "migrate_set_downtime"}, {"name": "migrate_set_speed"}, {"name": "query-migrate-cache-size"}, {"name": "migrate-set-cache-size"}, {"name": "migrate_cancel"}, {"name": "migrate"}, {"name": "xen-set-global-dirty-log"}, {"name": "xen-save-devices-state"}, {"name": "ringbuf-read"}, {"name": "ringbuf-write"}, {"name": "inject-nmi"}, {"name": "pmemsave"}, {"name": "memsave"}, {"name": "cpu-add"}, {"name": "cpu"}, {"name": "send-key"}, {"name": "device_del"}, {"name": "device_add"}, {"name": "system_powerdown"}, {"name": "system_reset"}, {"name": "system_wakeup"}, {"name": "cont"}, {"name": "stop"}, {"name": "__com.redhat_qxl_screendump"}, {"name": "screendump"}, {"name": "change"}, {"name": "__com.redhat_drive_del"}, {"name": "__com.redhat_drive_add"}, {"name": "eject"}, {"name": "quit"}]}
{"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}
{"error": {"class": "GenericError", "desc": "Property '.rtc-time' not found"}}

Comment 2 Gu Nini 2014-12-12 10:25:22 UTC
Have done test with the the test package https://brewweb.devel.redhat.com/taskinfo?taskID=8368750, no the bug issue any more:

[root@ibm-p8-virt-01 ~]# nc -U /var/lib/libvirt/qemu/rhel7.1.monitor
{"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 2}, "package": " (qemu-kvm-rhev-2.1.2-16.el7.test)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"timestamp": {"seconds": 1418379753, "microseconds": 516943}, "event": "VSERPORT_CHANGE", "data": {"open": true, "id": "console0"}}
{"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}
{"return": {"tm_year": 114, "tm_sec": 55, "tm_hour": 10, "tm_min": 22, "tm_mon": 11, "tm_mday": 12}}

Comment 3 David Gibson 2015-01-29 05:04:55 UTC
Draft patches posted upstream, see https://www.mail-archive.com/qemu-devel@nongnu.org/msg271868.html

Still under discussion.

Comment 4 Gu Nini 2015-02-06 02:54:36 UTC
The bug also exists on power system, the software versions are as follows:

Host kernel: 3.10.53-2020.1.pkvm2_1_1.49.ppc64
Qemu kvm:
qemu-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-debuginfo-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-common-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-kvm-tools-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-img-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-kvm-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-system-x86-2.0.0-2.1.pkvm2_1_1.20.40.ppc64
qemu-system-ppc-2.0.0-2.1.pkvm2_1_1.20.40.ppc64

Comment 5 David Gibson 2015-02-06 04:49:03 UTC
That's expected but thanks for confirming.

Comment 6 IBM Bug Proxy 2015-02-06 13:20:49 UTC
------- Comment From fnovak@us.ibm.com 2015-02-06 13:10 EDT-------
reverse mirror of RHBZ 1172583 - [Power KVM] Qemu monitor command don't support {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}

Comment 8 Miroslav Rezanina 2015-03-19 09:08:19 UTC
Fix included in qemu-kvm-rhev-2.2.0-8.el7

Comment 9 IBM Bug Proxy 2015-06-12 16:40:15 UTC
------- Comment From fnovak@us.ibm.com 2015-06-12 16:39 EDT-------
AT this point, w/o some customer impact statement, this is not planned to be fixed in the 2.1.1.x series.  This is fixed in the 3.1.0.0...
If there's a strong case for fixing in 2.1.1.x, please provide some justification..

Comment 11 Gu Nini 2015-07-30 06:17:49 UTC
Verify the bug on both ppc64be and ppc64le host with following sw versions:

PPC64BE HOST:
host kernel: 3.10.0-300.el7.ppc64
Guest kernel: 3.10.0-295.el7.ppc64/3.10.0-295.el7.ppc64le
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-13.el7.ppc64

PPC64LE HOST:
host kernel: 3.10.0-300.el7.ppc64le
Guest kernel: 3.10.0-295.el7.ppc64/3.10.0-295.el7.ppc64le
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-13.el7.ppc64le


Now qmp cmd 'qom-get' could get the rtc-time correctly:

[root@ibm-p8-rhevm-05 ~]# nc -U /home/spaprraw-0526-le.monitor
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 3, "major": 2}, "package": " (qemu-kvm-rhev-2.3.0-13.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}
{"return": {"tm_year": 106, "tm_sec": 29, "tm_hour": 0, "tm_min": 8, "tm_mon": 5, "tm_mday": 6}}

Comment 12 Qunfang Zhang 2015-08-03 05:48:29 UTC
Setting to VERIFIED according to comment 11.

Comment 13 mazhang 2015-09-17 08:06:42 UTC
Hi David,

I found this bug also happened on qemu-kvm-1.5.3-103.el7, do you plan fix it, if yes, I'll file a bug trace it?

{"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-103.el7)"}, "capabilities": []}}
{ "execute": "qmp_capabilities" }
{"return": {}}
{"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} }
{"error": {"class": "GenericError", "desc": "Property '.rtc-time' not found"}}


Thanks,
Mazhang.

Comment 14 mazhang 2015-09-17 08:40:44 UTC
Since the problem is on x86 platform, I'll file a new bug trace it, cancel this needinfo.

Comment 16 errata-xmlrpc 2015-12-04 16:23:35 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-2546.html