hi, may be with -drive if=none,file=/dev/sdb,id=usb -device usb-storage,drive=usb,id=usb
and possibly add -snapshot regards. Le lun. 8 nov. 2021 à 17:23, Thomas Huth <th...@redhat.com> a écrit : > On 07/11/2021 16.30, Marcin Zajączkowski wrote: > > Hi. Having some (dracut-related) issues with a Fedora LiveCD installed > > on a pendrive, I wanted to play with it using qemu instead of a real > > computer. Unfortunately, while the pendrive boot fine in real, with > > qemu, I ended up with "Booting from Hard Drive..." displayed and 2 > > vCores working on 100% for several minutes (until I interrupted it). > > Most likely, it is a problem with the way I try to achieve that: > > > >> sudo qemu-system-x86_64 -enable-kvm -m 4196 -drive > file=/dev/sdb,format=raw,index=0,media=disk -boot menu=on > > > > or more "dangerous" variant: > >> sudo qemu-system-x86_64 -enable-kvm -m 4196 -hda /dev/sdb -boot menu=on > > IIRC that will attach the disk as an IDE drive to your guest. And I guess > the initrd of your guest does not contain the right kernel modules for > this > interface. > > > What could be wrong with that approach? What is the best way to boot a > > VM using a bootable disk connected as a USB device (here recognized as > > /dev/sdb)? > > Not sure, but you could try to attach it as (emulated) USB device to your > guest, too, by using something like: > > -drive if=none,id=d1,file=... -device usb-storage,drive=d1 > > HTH, > Thomas > > >