Bug 1507693 - Unable to hot plug device to VM reporting libvirt errors.
Summary: Unable to hot plug device to VM reporting libvirt errors.
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Marcel Apfelbaum
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords: Regression
Depends On:
Blocks: 1525303
TreeView+ depends on / blocked
 
Reported: 2017-10-30 23:36 UTC by Ribu Tho
Modified: 2018-04-11 00:45 UTC (History)
21 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-04-11 00:44:15 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 None None None 2018-04-11 00:45 UTC
Red Hat Knowledge Base (Solution) 3234841 None None None 2017-11-08 04:20 UTC

Description Ribu Tho 2017-10-30 23:36:24 UTC
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:

Comment 6 Ján Tomko 2017-10-31 11:57:47 UTC
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"}}

Comment 7 Ribu Tho 2017-11-01 03:42:04 UTC
@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

Comment 8 Michal Skrivanek 2017-11-01 05:00:35 UTC
(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

Comment 19 Marcel Apfelbaum 2018-01-08 14:29:33 UTC
Upstream fix:  ab938ae4  "hw/acpi: Move acpi_set_pci_info to pcihp"

Comment 22 Miroslav Rezanina 2018-01-23 12:59:13 UTC
Fix included in qemu-kvm-rhev-2.10.0-18.el7

Comment 24 huiqingding 2018-01-30 02:45:26 UTC
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"}}

Comment 25 huiqingding 2018-01-30 02:50:11 UTC
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.

Comment 26 huiqingding 2018-01-30 02:51:36 UTC
Based on comment #25, set this bug to be verified.

Comment 30 errata-xmlrpc 2018-04-11 00:44:15 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://access.redhat.com/errata/RHSA-2018:1104


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