Hide Forgot
Description of problem: Libvirt should check unnecessary pci-address for usb type disk before starting domain Version-Release number of selected component (if applicable): libvirt-0.10.2-29.el6.x86_64 qemu-kvm-0.12.1.2-2.398.el6.x86_64 kernel-2.6.32-412.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. Edit domain and add a unavailable pci address to usb disk <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/usb-img/usb.img'/> <target dev='sdd' bus='usb'/> <alias name='usb-disk3'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> 2. Dump domain xml [root@test777 ~]# virsh dumpxml r6 ... <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/usb-img/usb.img'/> <target dev='sdd' bus='usb'/> <alias name='usb-disk3'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> ... 3. Start domain [root@test777 ~]# virsh start r6 Domain r6 started [root@test777 ~]# virsh dumpxml r6 ... <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/usb-img/usb.img'/> <target dev='sdd' bus='usb'/> <alias name='usb-disk3'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> ... Actual results: See above steps. Expected results: Libvirt should fail to start domain when we configure some wrong elements for usb disk. The expected results should be same as below: Need give error info like bus='ide' or bus='scsi': # virsh start rhel6u2 error: Failed to start domain rhel6u2 error: internal error unexpected address type for ide disk # virsh start rhel6u2 error: Failed to start domain rhel6u2 error: internal error unexpected address type for scsi disk Additional info: On rhel7 host, I can not reproduce it. Version: libvirt-1.1.1-13.el7.x86_64 qemu-kvm-1.5.3-19.el7.x86_64 kernel-3.10.0-54.el7.x86_64 [root@ibm-x3850x5-07 216365]# virsh dumpxml r7 ... <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/usb-img/usb-a-a.img'/> <target dev='sdd' bus='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> </disk> ... [root@ibm-x3850x5-07 216365]# virsh start r7 error: Failed to start domain r7 error: internal error: early end of file from monitor: possible problem: qemu-kvm: -device usb-storage,bus=pci.0,addr=0xe,drive=drive-usb-disk3,id=usb-disk3: Device 'usb-storage' can't go on a PCI bus
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.