Red Hat Bugzilla – Bug 1507693
Unable to hot plug device to VM reporting libvirt errors.
Last modified: 2018-04-10 20:45:49 EDT
Description of problem: Hot plugging a disk results in libvirt errors as follows libvirtError: internal error: unable to execute QEMU command 'device_add': Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set Version-Release number of selected component (if applicable): libvirt-python-3.2.0-3.el7.x86_64 qemu-kvm-rhev-2.9.0-16.el7_4.3.x86_64 vdsm-4.17.43-1.el7ev.noarch kernel-3.10.0-693.el7.x86_64 How reproducible: Not reproducible always and seems to be a corner case for which error is being reported. Steps to Reproduce: 1. Create a disk for a running VM. 2. Disk creation completes successfully 3. Fails to attach to the VM reporting libvirt error. Actual results: - Disk fails to attach. Expected results: - Attach disk to VM successfully. Additional info:
Hotplugging a disk does not work with rhel6.5.0 machine type and qemu-kvm-rhev-2.9.0-1.el7.x86_64, here are the commands sent by libvirt: 2017-10-31 11:50:48.368+0000: 2082: info : qemuMonitorSend:1063 : QEMU_MONITOR_SEND_MSG: mon=0x7f404800d820 msg={"execute":"__com.redhat_drive_add","arguments":{"file":"/dev/test/base","format":"raw","id":"drive-virtio-disk2"},"id":"libvirt-21"} 2017-10-31 11:50:48.370+0000: 2081: info : qemuMonitorJSONIOProcessLine:213 : QEMU_MONITOR_RECV_REPLY: mon=0x7f404800d820 reply={"return": {}, "id": "libvirt-21"} 2017-10-31 11:50:48.370+0000: 2082: info : qemuMonitorSend:1063 : QEMU_MONITOR_SEND_MSG: mon=0x7f404800d820 msg={"execute":"device_add","arguments":{"driver":"virtio-blk-pci","scsi":"off","bus":"pci.0","addr":"0x4","drive":"drive-virtio-disk2","id":"virtio-disk2"},"id":"libvirt-22"} 2017-10-31 11:50:48.376+0000: 2081: info : qemuMonitorJSONIOProcessLine:208 : QEMU_MONITOR_RECV_EVENT: mon=0x7f404800d820 event={"timestamp": {"seconds": 1509450648, "microseconds": 376310}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio-disk2/virtio-backend"}} 2017-10-31 11:50:48.377+0000: 2081: info : qemuMonitorJSONIOProcessLine:213 : QEMU_MONITOR_RECV_REPLY: mon=0x7f404800d820 reply={"id": "libvirt-22", "error": {"class": "GenericError", "desc": "Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set"}} 2017-10-31 11:50:48.377+0000: 2082: info : qemuMonitorSend:1063 : QEMU_MONITOR_SEND_MSG: mon=0x7f404800d820 msg={"execute":"__com.redhat_drive_del","arguments":{"id":"drive-virtio-disk2"},"id":"libvirt-23"} 2017-10-31 11:50:48.378+0000: 2081: info : qemuMonitorJSONIOProcessLine:213 : QEMU_MONITOR_RECV_REPLY: mon=0x7f404800d820 reply={"id": "libvirt-23", "error": {"class": "GenericError", "desc": "Device 'drive-virtio-disk2' not found"}}
@Ján, Tested the operation based on your findings to hotplug a device to a guest running RHEL 6.5 for which it worked fine for me in our labs. Currently, there is no info for the RHEL guest version that the customer is running and qemu-kvm-rhev package run by the customer is on the latest version. Let me know if more information is required. Ribu
(In reply to Ribu Tho from comment #7) > Tested the operation based on your findings to hotplug a device to a guest > running RHEL 6.5 for which it worked fine for me in our lab. It's the machine type, not guest OS. Try with a 3.6 cluster VM
Upstream fix: ab938ae4 "hw/acpi: Move acpi_set_pci_info to pcihp"
Fix included in qemu-kvm-rhev-2.10.0-18.el7
Reproduce this bug using version: qemu-kvm-rhev-2.10.0-17.el7.x86_64 kernel-3.10.0-838.el7.x86_64 1. boot a rhel7.5 guest /usr/libexec/qemu-kvm \ -name rhel6 \ -machine rhel6.5.0,accel=kvm \ -m 4096 \ -cpu Opteron_G3,check \ -realtime mlock=on \ -smp 4 \ -uuid 49a3438a-70a3-4ba8-92ce-3a05e0934608 \ -nodefaults \ -rtc base=utc,driftfix=slew \ -no-shutdown \ -global PIIX4_PM.disable_s3=1 \ -global PIIX4_PM.disable_s4=1 \ -boot order=c,menu=on,strict=on \ -device virtio-scsi-pci,id=scsi0,cmd_per_lun=234,bus=pci.0,addr=0x8 \ -drive file=/mnt/rhel7.5.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop \ -device virtio-scsi-pci,id=scsi1,addr=0x13 \ -device scsi-hd,drive=drive-scsi-disk,bus=scsi1.0,id=data-disk2,bootindex=1 \ -net none \ -monitor stdio \ -qmp tcp:0:4466,server,nowait -serial unix:/tmp/ttym,server,nowait \ -vga cirrus \ -vnc :0 \ 2. create a disk on host #qemu-img create -f raw disk2 5G 3. attach the disk to the guest {"execute":"qmp_capabilities"} {"return": {}} {"execute":"__com.redhat_drive_add","arguments":{"file":"/mnt/disk2","format":"raw","id":"drive-virtio-disk2"}} {"return": {}} {"execute":"device_add","arguments":{"driver":"virtio-blk-pci","scsi":"off","drive":"drive-virtio-disk2","id":"virtio-disk2"}} after step3, there is error: {"timestamp": {"seconds": 1517279938, "microseconds": 289743}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio-disk2/virtio-backend"}} {"error": {"class": "GenericError", "desc": "Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set"}}
Verify this bug using the version: qemu-kvm-rhev-2.10.0-18.el7.x86_64 kernel-3.10.0-838.el7.x86_64 Use the same steps of comment #24, after step3, the disk can be attached to the guest: {"execute":"qmp_capabilities"} {"return": {}} {"execute":"__com.redhat_drive_add","arguments":{"file":"/mnt/disk2","format":"raw","id":"drive-virtio-disk2"}} {"return": {}} {"execute":"device_add","arguments":{"driver":"virtio-blk-pci","scsi":"off","drive":"drive-virtio-disk2","id":"virtio-disk2"}} {"return": {}} Inside the guest, run "fdisk -l" and the disk can be found.
Based on comment #25, set this bug to be verified.
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://access.redhat.com/errata/RHSA-2018:1104