mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
d78554d884
The current code for using -drive simply sets the -drive 'index' parameter. QEMU internally converts this to bus/unit depending on the type of drive. This does not give us precise control over the bus/unit assignment though. This change switches over to make libvirt explicitly calculate the bus/unit number. In addition bus/unit/index are actually irrelevant for VirtIO disks, since each virtio disk is a separate PCI device. No disk controller is involved. Doing the conversion to bus/unit in libvirt allows us to correctly attach SCSI controllers when required. * src/qemu/qemu_conf.c: Specify bus/unit instead of index for disks * tests/qemuxml2argvdata/qemuxml2argv-disk*.args: Switch over from using index=NNNN, to bus=NN, unit=NN for SCSI/IDE/Floppy disks
2 lines
424 B
Plaintext
2 lines
424 B
Plaintext
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0 -drive file=/tmp/data.img,if=xen,index=0 -drive file=/tmp/logs.img,if=xen,index=6 -net none -serial none -parallel none -usb
|