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.
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.