Bug 518701

Summary: RFE: [LTC 6.0] Add async qemu machine protocol (qmp) to libvirt [202014]
Product: Red Hat Enterprise Linux 6 Reporter: IBM Bug Proxy <bugproxy>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: ajia, berrange, dyuan, gren, hbrock, jjarvis, kmonroe, llim, nzhang, snagar, syeghiay, xen-maint
Target Milestone: betaKeywords: FutureFeature
Target Release: 6.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 16:20:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 356741, 554559    

Description IBM Bug Proxy 2009-08-21 18:00:29 UTC
=Comment: #0=================================================
Emily J. Ratliff <ratliff.com> - 
1. Feature Overview:
Feature Id:	[202014]
a. Name of Feature:	Add async qemu machine protocol (qmp) to libvirt
b. Feature Description
Switch libvirt to use qmp to manipulate qemu/kvm VMs

2. Feature Details:
Sponsor:	LTC
Architectures:
x86
x86_64

Arch Specificity: Both
Affects Kernel Modules: Yes
Delivery Mechanism: Direct from community
Category:	Xen
Request Type:	Driver - New - Open Source
d. Upstream Acceptance:	Submitted
Sponsor Priority	2
f. Severity: Medium
IBM Confidential:	no
Code Contribution:	3rd party code
g. Component Version Target:	latest libvirt

3. Business Case
Switching to qmp provides a more reliable protocol on top of which we can build a more robust,
asynchronous communication channel for managing VMs.  The result provides management applications
which consume libvirt greater control over VM bahavior.

4. Primary contact at Red Hat: 
John Jarvis
jjarvis

5. Primary contacts at Partner:
Project Management Contact:
Stephanie Glass, sglass.com, 512-838-9284

Technical contact(s):
Ryan Harper, raharper.com

IBM Manager:
Warren Grunbok II, grunbok.com

Comment 2 Daniel Veillard 2009-10-08 13:35:38 UTC
This is still open, the libvirt code to communicate with KVM console
will be modified in time for 6.0 to allow asynchronous handling of
operations, and avoid blocking. But for qmp itself it's unlikely to
be implemented for 6.0 GA, there have been multiple proposals to improve
communication at the QEmu level too.
Basically this is in a large part undecided upstream, and probably
won't be handled specifically with qmp even though the expected improvement
may still be seen in 6.0. Still adding a Conditional NACK Upstream based
on the status quo in QEmu and libvirt upstream

Daniel

Comment 3 Daniel Berrangé 2009-11-12 18:38:56 UTC
There is basic boilerplate / proof of concept code started for libvirt:

http://www.redhat.com/archives/libvir-list/2009-November/msg00098.html

Further work is temporarily blocked, pending finalization of the QEMU implementation / protocol spec.

Comment 4 Daniel Berrangé 2009-11-26 18:45:06 UTC
A fully functional implementation is now available

http://www.redhat.com/archives/libvir-list/2009-November/msg00752.html

though it will require a few tweaks as upstream QEMU has not quite finalized their command naming

Comment 5 Hugh Brock 2009-12-21 17:18:57 UTC
Need a QA ack please!

Comment 6 Daniel Veillard 2010-01-21 17:34:19 UTC
libvirt-0.7.6-0.pre20100121.el6 has been built in RHEL-6-candidate
and includes the feature, based on JSON interface,

Daniel

Comment 8 John Jarvis 2010-02-02 20:35:51 UTC
IBM is signed up to test and provide feedback.

Comment 9 IBM Bug Proxy 2010-05-11 20:10:56 UTC
------- Comment From mdroth.ibm.com 2010-05-11 16:06 EDT-------
Verified indirectly by bypassing libvirt and making sure the command-line it is using is the proper parameters to enable a QMP monitor socket.

[root@bc1cn3 ~]# uname -a
Linux bc1cn3.phx.austin.ibm.com 2.6.32-22.el6.x86_64 #1 SMP Tue Apr 20 12:10:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

[root@bc1cn3 ~]# rpm -q redhat-release
redhat-release-6-6.0.0.24.el6.x86_64

[root@bc1cn3 temp]# /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 2048 -smp 1,sockets=1,cores=1,threads=1 -name test -uuid a4cdeb43-cfe8-5d61-4561-fee58b8fdb81 -nodefaults -chardev socket,id=monitor,host=localhost,port=5950,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/root/temp/rhel54_64_base.raw,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 0.0.0.0:51 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
char device redirected to /dev/pts/2
...

[root@bc1cn3 ~]# telnet localhost 5950
Trying ::1...
Connected to localhost.
Escape character is '^]'.
{"QMP": {"version": {"qemu": "0.12.1", "package": " (qemu-kvm-0.12.1.2)"}, "capabilities": []}}
{ "execute" : "query-block" }
{"error": {"class": "CommandNotFound", "desc": "The command query-block has not been found", "data": {"name": "query-block"}}}
{ "execute" : "qmp_capabilities" }
{"return": {}}
{ "execute" : "query-block" }
{"return": [{"device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "raw", "encrypted": false, "file": "/root/temp/rhel54_64_base.raw"}, "type": "hd"}, {"device": "drive-ide0-1-0", "locked": false, "removable": true, "type": "cdrom"}]}

Comment 10 dyuan 2010-06-21 07:15:34 UTC
According to comment 9, change the bug status to verified.

Comment 11 releng-rhel@redhat.com 2010-11-11 16:20:12 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.