Bug 1263978 - qmp don't support {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}
qmp don't support {"execute":"qom-get","arguments":{"path":"/machine","proper...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
x86_64 Unspecified
medium Severity medium
: rc
: ---
Assigned To: Markus Armbruster
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2015-09-17 04:55 EDT by mazhang
Modified: 2016-09-20 00:41 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-10-07 22:37:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mazhang 2015-09-17 04:55:05 EDT
Description of problem:
qmp don't support {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"}}

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1.Start qemu-kvm process, execute qom-get.
# /usr/libexec/qemu-kvm -qmp tcp:0:6773,server,nowait

{"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"}}


Actual results:
Not found rtc-time.

Expected results:
qemu-kvm also support rtc-time.

Additional info:
qemu-kvm-rhev-2.3.0-23.el7 works well.
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 3, "major": 2}, "package": " (qemu-kvm-rhev-2.3.0-23.el7)"}, "capabilities": []}}
{ "execute": "qmp_capabilities" }
{"return": {}}
{"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} }
{"return": {"tm_year": 115, "tm_sec": 48, "tm_hour": 8, "tm_min": 50, "tm_mon": 8, "tm_mday": 17}}
Comment 2 Markus Armbruster 2015-09-18 13:32:53 EDT
"/machine/rtc-time" is an alias to the property of the actual RTC
device.  Added upstream in commit 654a36d, v2.1.0.  Not in RHEL-7

For PC machines, the RTC device is "mc146818rtc", and
"/machine/rtc-time" is an alias for
"/machine/unattached/device[X]/date", where X can vary between
versions.  In my build of RHEL-6's qemu-kvm, it's 7.

To find the "mc146818rtc" device, search for the device with type
"mc146818rtc", like this:

QMP> { "execute": "qom-get", "arguments": { "path": "/machine/unattached/device[1]", "property": "type" } }
{"return": "kvmvapic"}

Not the right one, try next

QMP> { "execute": "qom-get", "arguments": { "path": "/machine/unattached/device[2]", "property": "type" } }
{"return": "kvmclock"}

and so forth until

QMP> { "execute": "qom-get", "arguments": { "path": "/machine/unattached/device[7]", "property": "type" } }
{"return": "mc146818rtc"}

QMP> { "execute": "qom-get", "arguments": { "path": "/machine/unattached/device[7]", "property": "date" } }
{"return": {"tm_year": 115, "tm_sec": 31, "tm_hour": 17, "tm_min": 27, "tm_mon": 8, "tm_mday": 18}}

The stable alias saves you from having to know the machine's RTC
device and the name of its property (neither is going to change in
RHEL-7 qemu-kvm), and saves you the search for it.

If you think we should backport the "/machine/rtc-time" alias to
RHEL-7 qemu-kvm, please state your business case.

If not, let us know so we can close out this bug.
Comment 3 mazhang 2015-09-20 22:58:54 EDT
This bug is according to qe's test case, I'll talk with the feature owner if close it. 
Since he is on pto, I'll update this bug when he back.

Comment 4 mazhang 2015-10-07 22:37:13 EDT
Just talk to scui, not need backport to qemu-kvm, so close this bug.


Note You need to log in before you can comment on or make changes to this bug.