qemu: Do not start with source for removable disks if tray is open

This is similiar with physical world, one will be surprised if the
box starts with medium exists while the tray is open.

New tests are added, tests disk-{cdrom,floppy}-tray are for the qemu
supports "-device" flag, and disk-{cdrom,floppy}-no-device-cap are
for old qemu, i.e. which doesn't support "-device" flag.
This commit is contained in:
Osier Yang
2012-03-14 23:26:48 +08:00
parent b22eaa7538
commit ad7db43913
10 changed files with 196 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-drive file=/dev/fd0,if=none,id=drive-fdc0-0-0 \
-global isa-fdc.driveA=drive-fdc0-0-0 \
-drive if=none,id=drive-fdc0-0-1 \
-global isa-fdc.driveB=drive-fdc0-0-1 \
-usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3