Bug 856915 - qemu should reject repeatedly to hot plug the exact same disk image without unplugging it first
qemu should reject repeatedly to hot plug the exact same disk image without u...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.9
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 02:35 EDT by Qian Guo
Modified: 2013-01-09 20:08 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-16 06:32:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Qian Guo 2012-09-13 02:35:05 EDT
Description of problem:
Boot a rhel5.9 guest, and load acpiphp module to support ACPI. Hot plug disk A through monitor, repeat hot plugging disk A without unplugging it.

Version-Release number of selected component (if applicable):
kvm-83-262.el5.x86_64.rpm


How reproducible:
100%

Steps to Reproduce:
1.start vm, that os is rhel5.9.
eg:/usr/libexec/qemu-kvm -no-hpet -no-kvm-pit-reinjection -smp 2,cores=1 -m 2048 -startdate now -rtc-td-hack -k en-us -usbdevice tablet -name Fst -boot c -drive file=/mnt/nfs/migtn.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop,boot=on -soundhw ac97 -M rhel5.6.0 -cpu qemu64 -monitor stdio -net nic,vlan=1,macaddr=00:1a:2a:09:21:02,model=virtio -net tap,vlan=1,script=/etc/qemu-ifup -vnc :10 
2.in guest, run#fdisk -l, there're only /dev/vda1,/dev/vda2;
3.in guest, load module acpiphp;
4.in qemu, hot plug one storage disk repeatedly; 
eg:
(qemu) pci_add pci_addr=auto storage file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio
OK domain 0, bus 0, slot 7, function 0
(qemu) pci_add pci_addr=auto storage file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio
OK domain 0, bus 0, slot 8, function 0
(qemu) pci_add pci_addr=auto storage file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio
OK domain 0, bus 0, slot 9, function 0
(qemu) pci_add pci_addr=auto storage file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio
OK domain 0, bus 0, slot 10, function 0
5.fdisk -l in guest, there're vda~vdf


Actual results:
multiple disks exist in the guest with different slots,though they are from the same source. 

Expected results:
one disk should be hot plugged only once except unplug it.

Additional info:

If start vm with multiple disks, that use the same path and same disk image,eg:
/usr/libexec/qemu-kvm -no-hpet -no-kvm-pit-reinjection -smp 2,cores=1 -m 2048 -startdate now -rtc-td-hack -k en-us -usbdevice tablet -name Fst -boot c -drive file=/mnt/nfs/migtn.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop,boot=on -soundhw ac97 -M rhel5.6.0 -cpu qemu64 -monitor stdio -net nic,vlan=1,macaddr=00:1a:2a:09:21:02,model=virtio -net tap,vlan=1,script=/etc/qemu-ifup -vnc :10 -drive file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop -drive file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop -drive file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop -drive file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop -drive file=/mnt/nfs/img/tmp/t1.qcow2,if=virtio,media=disk,format=qcow2,cache=off,werror=stop

The vm can start too.
Comment 1 Ronen Hod 2012-09-16 06:31:42 EDT
Not sure that this is a bug. It certainly does not make sense, and will not work well in most cases, but I do not see why it should be forbidden.
Anyhow, I am closing it for RHEL5 since we will not fix it, and if it is considered a bug then please check RHEL6 too.

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