Hide Forgot
Description of problem: Scsi-hd device have no free target when add it's cmdline after the usb-storage device's Version-Release number of selected component (if applicable): qemu-img-rhev-2.6.0-22.el7.ppc64le How reproducible: 100% Steps to Reproduce: 1.Boot vm with command: /usr/libexec/qemu-kvm \ -name vm \ -smp 4 \ -m 8192 \ -monitor stdio \ -vnc 0:59 \ -qmp tcp:0:9999,server,nowait \ -device virtio-scsi-pci,bus=pci.0\ -device nec-usb-xhci,id=controller \ -device usb-tablet,id=usbtablet \ -drive file=data.qcow2,if=none,id=driveusb,media=disk,format=qcow2,cache=none \ -device usb-storage,drive=driveusb,id=usbdisk,bus=controller.0,removable=on \ -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=0 \ -drive file=/home/RHEL-Server-7.3-ppc64le-virtio.qcow2,if=none,id=scsi-hd-dr0,format=qcow2,cache=none \ 2. 3. Actual results: Booting vm failed with error as following: (qemu) qemu-kvm: -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=0: no free target Expected results: Booting vm succeed without any error Additional info: x86 has this issue too.
(In reply to Xujun Ma from comment #0) > Description of problem: > Scsi-hd device have no free target when add it's cmdline after the > usb-storage device's usb-storage is a scsi host adapter too, so you now have two of them in the system. Which in turn implies that you have to explicitly tell qemu which adapter you want attach your scsi devices to. > -device virtio-scsi-pci,bus=pci.0\ Use "id=${name}" to attach a name to the controller. > -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=0 \ Use "bus=${name}.0" to tell which host controller should be used.