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 1377953

Summary: [Q35] fail to detect the hotpluging disk in guest under pci bridge on q35 machine type
Product: Red Hat Enterprise Linux 7 Reporter: jingzhao <jinzhao>
Component: qemu-kvm-rhevAssignee: Marcel Apfelbaum <marcel>
Status: CLOSED DUPLICATE QA Contact: jingzhao <jinzhao>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: chayang, juzhang, knoel, marcel, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-28 11:38:08 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:

Description jingzhao 2016-09-21 07:12:33 UTC
Description of problem:
fail to detect the hotpluging disk in guest under pci bridge on q35 machine type

Version-Release number of selected component (if applicable):
[root@jinzhao pci-bridge]# uname -r
3.10.0-509.el7.x86_64
[root@jinzhao pci-bridge]# rpm -qa |grep qemu-kvm-rhev
qemu-kvm-rhev-debuginfo-2.6.0-26.el7.x86_64
qemu-kvm-rhev-2.6.0-26.el7.x86_64


How reproducible:
3/3

Steps to Reproduce:
1.Boot guest with pci bridge on q35 machine type
/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-name rhel7.3 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-nodefaults \
-serial unix:/tmp/serial0,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-chardev file,path=/home/pci-bridge/seabios.log,id=seabios \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-qmp tcp:0:6666,server,nowait \
-device i82801b11-bridge,bus=pcie.0,id=bridge0 \
-device pci-bridge,bus=bridge0,id=bridge1,chassis_nr=1 \
-drive file=/home/pci-bridge/big.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-device virtio-net-pci,netdev=tap10,mac=9a:6a:6b:6c:6d:6e,bus=bridge1,addr=0x2.0 -netdev tap,id=tap10 \
-drive file=/home/pci-bridge/block1.qcow2,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-disk1,id=virtio-disk1,bus=bridge1,addr=0x1.0 \
-device VGA,id=video,bus=bridge1,addr=0x3.0 \
-vnc :2 \
-monitor stdio \

2. Hot plug disk on qmp
{"execute":"__com.redhat_drive_add", "arguments": {"file":"/home/pci-bridge/block2.qcow2","format":"qcow2","id":"test2"
}}
{"return": {}}
{"execute":"device_add","arguments":{"driver":"virtio-blk-pci","drive":"test2","id":"test2","bus":"bridge1","addr":"0x4.0"}}
{"return": {}}
{"execute":"__com.redhat_drive_add", "arguments": {"file":"/home/pci-bridge/test.raw","format":"raw","id":"drive_datadisk0"}}
{"return": {}}
{"execute":"device_add","arguments":{"driver":"virtio-scsi-pci","id":"scsi1","bus":"bridge1","addr":"0x5.0"}}
{"return": {}}
{"execute":"device_add","arguments":{"driver":"scsi-hd","drive":"drive_datadisk0","id":"device_datadisk0","bus":"scsi1.0"}}
{"return": {}}

3.check the block in hmp
(qemu) info block
drive-virtio-disk0 (#block138): /home/pci-bridge/big.img (qcow2)
    Cache mode:       writeback, direct

drive-virtio-disk1 (#block361): /home/pci-bridge/block1.qcow2 (qcow2)
    Cache mode:       writeback, direct

test2 (#block511): /home/pci-bridge/block2.qcow2 (qcow2)
    Cache mode:       writeback

drive_datadisk0 (#block747): /home/pci-bridge/test.raw (raw)
    Cache mode:       writeback

4. check the block in guest

Actual results:
Block devices didn't be found in guest
[root@localhost ~]# lsblk
NAME          MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda           252:0    0  30G  0 disk 
├─vda1        252:1    0   1G  0 part /boot
└─vda2        252:2    0  29G  0 part 
  ├─rhel-root 253:0    0  26G  0 lvm  /
  └─rhel-swap 253:1    0   3G  0 lvm  [SWAP]
vdb           252:16   0   5G  0 disk 
└─vdb1        252:17   0   5G  0 part 

Expected results:
Guest can be found in guest

Additional info:

Comment 1 jingzhao 2016-09-21 07:17:51 UTC
Marcel, I am not sure whether the reason of this bz is the same with bz1174614, so file a new bz. 
and tested the bz1174614 and devices can be found without reboot on pc machine type.
So,could you help to confirm it?

Thanks
Jing Zhao

Comment 4 Marcel Apfelbaum 2016-09-28 11:38:08 UTC
(In reply to jingzhao from comment #1)
> Marcel, I am not sure whether the reason of this bz is the same with
> bz1174614, so file a new bz. 
> and tested the bz1174614 and devices can be found without reboot on pc
> machine type.
> So,could you help to confirm it?
> 
> Thanks
> Jing Zhao

Hi,

It is not related to the mentioned BZs which involves the hot-plugging 
of the pci-bridge itself, however is a duplicate of:
https://bugzilla.redhat.com/show_bug.cgi?id=953008.

*** This bug has been marked as a duplicate of bug 953008 ***