| Summary: | [Q35] Disk didn't be found in guest when the connected to downstream as PCIe virtio devices | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | jingzhao <jinzhao> |
| Component: | qemu-kvm-rhev | Assignee: | Fam Zheng <famz> |
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | chayang, juzhang, knoel, virt-maint, xfu, yanyang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-06-27 04:41:49 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: | |
Hit the issue when hot-plug virtio-scsi devices with downstream, following is the details:
kernel-3.10.0-388.el7.x86_64
qemu-kvm-rhev-2.5.0-4.el7.x86_64
seabios-1.9.1-3.el7.x86_64
1. Boot guest with following cli:
/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 \
-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 \
-serial unix:/tmp/serial0,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga std \
-vnc :0 \
-qmp tcp:0:6666,server,nowait \
-drive file=/home/rhel.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,bus=pcie.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 \
-chardev file,path=/home/seabios.log,id=seabios \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-device ioh3420,bus=pcie.0,id=root.0,slot=1 \
-device x3130-upstream,bus=root.0,id=upstream1 \
-device xio3130-downstream,bus=upstream1,id=downstream1,chassis=1 \
-device xio3130-downstream,bus=upstream1,id=downstream2,chassis=2 \
-device virtio-scsi-pci,bus=downstream1,id=scsi_pci_bus0,disable-modern=off,disable-legacy=on \
-monitor stdio \
2. In qmp, hot-plug virtio-scsi disk
{"execute":"__com.redhat_drive_add","arguments":{"file":"/home/q35/scsi.raw","format":"raw","id":"scsi-disk"}}
{"return": {}}
{"execute":"device_add","arguments":{"driver":"scsi-disk","drive":"scsi-disk","id":"cd1","bus":"scsi_pci_bus0.0"}}
{"return": {}}
3.In hmp, check the block
(qemu) info block
drive-virtio-disk0 (#block133): /home/rhel.img (qcow2)
Cache mode: writeback, direct
scsi-disk (#block398): /home/q35/scsi.raw (raw)
Cache mode: writebac
4. In guest, check the disk through "fdisk -l"
After step4, disk didn't be found in guest
*** This bug has been marked as a duplicate of bug 1330002 *** |
Description of problem: Disk didn't be found in guest when the connected to downstream as PCIe virtio devices Version-Release number of selected component (if applicable): kernel-3.10.0-373.el7.x86_64 qemu-img-rhev-2.5.0-4.el7.x86_64 seabios-1.9.1-2.el7.x86_64 How reproducible: 3/3 Steps to Reproduce: 1.Boot guest with following cli: /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 rhel6 \ -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 \ -monitor stdio \ -serial unix:/tmp/serial0,server,nowait \ -boot menu=on \ -bios /usr/share/seabios/bios.bin \ -vga std \ -vnc :0 \ -drive file=/home/rhel.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \ -device virtio-blk-pci,bus=pcie.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 \ -device ioh3420,bus=pcie.0,id=root.0,slot=4 \ -device x3130-upstream,bus=root.0,id=upstream1 \ -device xio3130-downstream,bus=upstream1,id=downstream1,chassis=1 \ -device xio3130-downstream,bus=upstream1,id=downstream2,chassis=2 \ -netdev tap,id=hostnet1,vhost=on \ -device virtio-net-pci,netdev=hostnet1,id=net1,mac=54:52:00:B6:40:22,bus=pcie.0 \ -drive file=/home/q35/test2.raw,if=none,id=drive-virtio-disk3,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \ -device virtio-blk-pci,bus=downstream1,drive=drive-virtio-disk3,id=virtio-disk3,disable-modern=off,disable-legacy=on \ -drive file=/home/q35/test1.raw,if=none,id=drive-virtio-disk4,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \ -device virtio-blk-pci,bus=downstream2,drive=drive-virtio-disk4,id=virtio-disk4,disable-modern=off,disable-legacy=on \ 2. Check the block device in hmp and can be found (qemu) info block drive-virtio-disk0 (#block104): /home/rhel.img (qcow2) Cache mode: writeback, direct drive-virtio-disk3 (#block318): /home/q35/test2.raw (raw) Cache mode: writeback, direct drive-virtio-disk4 (#block561): /home/q35/test1.raw (raw) Cache mode: writeback, direct 3. In guest, check the block device through "fdisk -l" Actual results: Didn't found the disk in guest through "fdisk -l" [root@localhost ~]# fdisk -l Disk /dev/vda: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000aae7a Device Boot Start End Blocks Id System /dev/vda1 * 2048 1026047 512000 83 Linux /dev/vda2 1026048 41943039 20458496 8e Linux LVM Disk /dev/mapper/rhel-root: 18.8 GB, 18756927488 bytes, 36634624 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/rhel-swap: 2147 MB, 2147483648 bytes, 4194304 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Expected results: Disk can found in guest Additional info: Disk can be found if deleted the parameter "disable-modern=off,disable-legacy=on" in the qemu command