qemu: how to select from which hdd to boot?
I want to connect 2 hdds to my qemu virtual machine. One of them is actually a file connected via virtio, and I want it to be the bootable drive. The other is a partition that I want to pass through; I add it through IDE (though I'm not sure if it's the best way to do it). The problem is, as soon as I add the IDE drive, it takes priority in Seabios, and the virtual machine will try to boot from it, ignoring the bootable virtio drive. This can be worked around by using boot menu, but it's tedious. I want to be able to somehow make the virtio drive the default bootable drive, maybe by changing the order in which drives are listed in Seabios, is it possible? The relevant part of the command I start qemu-system-x86_64 with is:
-device virtio-scsi-pci,id=scsi \
-drive file=/media/kv/vms/win-qad.img,id=disk,format=raw -device scsi-hd,drive=disk \
-drive file=/dev/sdg1,id=shared_disk,format=raw -device ide-hd,bus=ide.1,drive=shared_disk \ 1 Answer
Yes, "sata" device is probed first, but you can change the boot device either "hand-off" with:
-boot order=cor by manual selection with:
-boot menu=onBoth option can be used thogether:
-boot order=c,menu=on 2