Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 889051

Summary: Commands "__com.redhat_drive_add/del" don' t exist in RHEL7.0
Product: Red Hat Enterprise Linux 7 Reporter: juzhang <juzhang>
Component: qemu-kvmAssignee: Markus Armbruster <armbru>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: urgent    
Version: 7.0CC: areis, armbru, bili, eblake, flang, juzhang, knoel, lcapitulino, michen, mrezanin, qzhang, sluo, thomas.oulevey, unicell, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-30.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:10:23 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:
Bug Depends On:    
Bug Blocks: 720747, 895240, 1026966    

Description juzhang 2012-12-20 06:20:49 UTC
Description of problem:
Can not find "__com.redhat_drive_add/del" commands in HMP and QMP On RHEL7.0. On RHEL6.4, if you want to hotadd/remove block, you need to use the "__com.redhat_drive_add & device_add" and "device_del&__com.redhat_drive_del", I tried to use hotadd/remove a disk by using rhelm3.1 and monitored the command.

2012-12-19 11:18:32.842+0000: 25440: debug : qemuMonitorIOWrite:461 : QEMU_MONITOR_IO_WRITE: mon=0x7f4f54000bc0 buf={"execute":"device_add","arguments":{"driver":"virtio-blk-pci","scsi":"off","bus":"pci.0","addr":"0x8","drive":"drive-virtio-disk2","id":"virtio-disk2"},"id":"libvirt-215"}
2012-12-19 11:18:32.798+0000: 25440: debug : qemuMonitorIOWrite:461 : QEMU_MONITOR_IO_WRITE: mon=0x7f4f54000bc0 buf={"execute":"__com.redhat_drive_add","arguments":{"file":"/rhev/data-center/2a58c701-8bab-4613-8b33-2d8c862f7355/a6fb82ba-8ed1-4665-aa18-6c683e6e5344/images/a23772e7-f9ab-423b-80e6-b977fbaf29de/5e224589-c347-4c31-b431-169967065f69","id":"drive-virtio-disk2","format":"qcow2","serial":"a23
772e7-f9ab-423b-80e6-b977fbaf29de","cache":"none","werror":"stop","rerror":"stop","aio":"native"},"id":"libvirt-214"}
2012-12-19 11:18:16.145+0000: 25440: debug : qemuMonitorIOWrite:461 : QEMU_MONITOR_IO_WRITE: mon=0x7f4f54000bc0 buf={"execute":"device_del","arguments":{"id":"virtio-disk1"},"id":"libvirt-180"}
<chayang> 2012-12-19 11:18:16.149+0000: 25443: debug : qemuMonitorSend:903 : QEMU_MONITOR_SEND_MSG: mon=0x7f4f54000bc0 msg={"execute":"__com.redhat_drive_del","arguments":{"id":"drive-virtio-disk1"},"id":"libvirt-181"}

Currently, if qemu-kvm on RHEL7 do not have __com.redhat_drive_add/del, seems the rhelm can not use this function. 

Version-Release number of selected component (if applicable):
Host Kernel
#uname -r
3.6.0-0.29.el7.x86_64
qemu-kvm version
qemu-kvm-1.2.0-20.el7.x86_64


How reproducible:
100%



Steps to Reproduce:
1.Boot guest
#/usr/libexec/qemu-kvm -cpu Opteron_G3 -m 2048 -smp 2,sockets=1,cores=2,threads=1 -enable-kvm -name rhel64 -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67171 -k en-us -rtc base=localtime,clock=host,driftfix=slew  -monitor stdio -qmp tcp:0:5555,server,nowait -boot menu=on -bios /usr/share/seabios/bios.bin -drive file=/home/rhel6u4_mazhang.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,addr=0x5 -device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 -netdev tap,id=hostnet0,downscript=no -device e1000,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1b,bus=pci.0,addr=0x4,bootindex=2 -chardev socket,path=/tmp/isa-serial1,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -vnc :9  -drive file=/root/zhangjunyi/virtio_12G.qcow2,format=qcow2,if=none,id=ide1,cache=none,werror=stop,rerror=stop  -device ide-drive,drive=ide1,id=ide2 -device sga
2. Can not find the __com.redhat_drive_add/del commands via HMP and QMP, can find drive_add.
#(qemu) ?
...
#{"execute":"query-commands"}
{"return": [{"name": "query-target"}, {"name": "query-cpu-definitions"}, {"name": "query-machines"}, {"name": "device-list-properties"}, {"name": "qom-list-types"}, {"name": "change-vnc-password"}, {"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-uuid"}, {"name": "query-name"}, {"name": "query-spice"}, {"name": "query-vnc"}, {"name": "query-mice"}, {"name": "query-status"}, {"name": "query-kvm"}, {"name": "query-pci"}, {"name": "query-cpus"}, {"name": "query-blockstats"}, {"name": "query-block"}, {"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": "blockdev-snapshot-sync"}, {"name": "transaction"}, {"name": "block-job-cancel"}, {"name": "block-job-set-speed"}, {"name": "block-stream"}, {"name": "block_resize"}, {"name": "netdev_del"}, {"name": "netdev_add"}, {"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-save-devices-state"}, {"name": "inject-nmi"}, {"name": "pmemsave"}, {"name": "memsave"}, {"name": "cpu"}, {"name": "device_del"}, {"name": "device_add"}, {"name": "system_powerdown"}, {"name": "system_reset"}, {"name": "system_wakeup"}, {"name": "cont"}, {"name": "stop"}, {"name": "screendump"}, {"name": "change"}, {"name": "eject"}, {"name": "quit"}]}
  
Actual results:
Can not find "__com.redhat_drive_add/del" commands in HMP and QMP On RHEL7.0

Expected results:
Should have "__com.redhat_drive_add/del" commands, since the rhelm execute the hot plug/unplug disk by issuing  the command "{"execute":"device_add","arguments":{"driver":"virtio-blk-pci","scsi":"off","bus":"pci.0","addr":"0x8","drive":"drive-virtio-disk2","id":"virtio-disk2"} & {"execute":"__com.redhat_drive_add","arguments":{"file":"/rhev/data-center/2a58c701-8bab-4613-8b33-2d8c862f7355/a6fb82ba-8ed1-4665-aa18-6c683e6e5344/images/a23772e7-f9ab-423b-80e6-b977fbaf29de/5e224589-c347-4c31-b431-169967065f69","id":"drive-virtio-disk2","format":"qcow2","serial":"a23
772e7-f9ab-423b-80e6-b977fbaf29de","cache":"none","werror":"stop","rerror":"stop","aio":"native"},"id":"libvirt-214"}"

Additional info:
1. I tried to use hotadd/remove a disk by using rhelm3.1 and monitored the command. The rhelm3.1 call __com.redhat_drive_add/del commands.
2. I am not sure the commands are called by rhelm will keep the as same as RHEL6.4. I filed this bug according to RHEL6.4 rules. Please free to close this bug if RHEL7.0 will use the combination(drive_add & device_add) instead of the combination ("__com.redhat_drive_add & device_add").

Comment 1 juzhang 2012-12-20 07:40:08 UTC
Additional info:
3. I tested latest upstream(qemu1.3), hit the same issue.

Comment 2 Luiz Capitulino 2013-01-07 15:38:29 UTC
You're right that the commands don't exist in RHEL7.0 and upstream.

Those commands (and any commands starting with __com.redhat_) are Red Hat specific commands and exist only in RHEL6.4.

IIRC, the upstream solution is/was to have new block commands for that, which were/are being worked on by Markus. Either, we get the replacement commands merged upstream in time for RHEL-7.0 or we'll have to forward port the RHEL6 ones to RHEL-7.0.

Re-assigning to Markus, as (if my memory isn't failing me) he was the person who worked on the __com.redhat_drive_add/del commands.

Comment 3 Luiz Capitulino 2013-02-04 11:31:53 UTC
*** Bug 907290 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Rezanina 2013-11-11 08:44:54 UTC
After adding __com.redhat_drive_add command, drive_add command should be disabled
as we will use downstream version instead of upstream one.

Comment 6 Ademar Reis 2013-12-06 13:56:33 UTC
*** Bug 1032388 has been marked as a duplicate of this bug. ***

Comment 8 Sibiao Luo 2013-12-11 07:06:24 UTC
Hi Markus,

   Could you help see comment #7, this lack of __com.redhat_drive_add/del effect our hotpluging functional testing and bug 1032388 was duplicated to this one, so could you help to fixed this bug soon ? Thanks in advance.

Best Regards,
sluo

Comment 9 Markus Armbruster 2013-12-11 09:34:27 UTC
I hope to post my patch today.

Comment 13 langfang 2013-12-23 03:38:48 UTC
Reproduce this bus as follow version:
Host:
qemu-kvm-1.5.3-21.el7.x86_64

Guest:rhel7

Steps:
1.Boot guest with 
 "/usr/libexec/qemu-kvm -qmp tcp:0:4445,server,nowait....."
2.Host:
telnet 10.66.106.21 4445
Trying 10.66.106.21...
Connected to 10.66.106.21.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-21.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"query-commands"}


Results:
can't found "__com.redhat_drive_add/del" commands

Verify this bug as follow version:

Host:

qemu-kvm-1.5.3-30.el7.x86_64


Steps as same as reproduce


Results:
{"execute":"query-commands"}
{"return": [{"name": "query-rx-filter"}, {"name": "blockdev-add"}, {"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-spice"}, {"name": "query-vnc"}, {"name": "query-mice"}, {"name": "query-status"}, {"name": "query-kvm"}, {"name": "query-pci"}, {"name": "query-cpus"}, {"name": "query-blockstats"}, {"name": "query-block"}, {"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": "block-job-complete"}, {"name": "block-job-resume"}, {"name": "block-job-pause"}, {"name": "block-job-cancel"}, {"name": "block-job-set-speed"}, {"name": "block_resize"}, {"name": "netdev_del"}, {"name": "netdev_add"}, {"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"}]}


Can found commands "__com.redhat_drive_add/del"


Addtional info:
1)Try add/del blk
...
{ "execute": "__com.redhat_drive_add", "arguments": { "id": "drive1","file":"/home/disk01.img","format":"qcow2"} }
{"return": {}}
 { "execute": "device_add", "arguments": { "driver": "virtio-blk-pci","drive":"drive1","id": "virtio-blk-pci1" } }
{"return": {}}
 { "execute": "__com.redhat_drive_del", "arguments": { "id": "drive1" } }
{"return": {}}

the command work well

According to above test,this bug has been fixed.

Comment 15 Ludek Smid 2014-06-13 13:10:23 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.