knazarov / homebrew-qemu-virgl

A homebrew tap for qemu with support for 3d accelerated guests
415 stars 68 forks source link

does not boot from cdrom #32

Open cfriedt opened 3 years ago

cfriedt commented 3 years ago

I copied and pasted the 'boot from cdrom' command and it did not work.

qemu-system-aarch64 \
         -machine virt,accel=hvf,highmem=off \
         -cpu cortex-a72 -smp 2 -m 4G \
         -device intel-hda -device hda-output \
         -device virtio-gpu-pci \
         -device virtio-keyboard-pci \
         -device virtio-net-pci,netdev=net \
         -device virtio-mouse-pci \
         -display cocoa,gl=es \
         -netdev user,id=net,ipv6=off \
         -drive "if=pflash,format=raw,file=./edk2-aarch64-code.fd,readonly=on" \
         -drive "if=pflash,format=raw,file=./edk2-arm-vars.fd,discard=on" \
         -drive "if=virtio,format=raw,file=./hdd.raw,discard=on" \
         -cdrom focal-desktop-arm64.iso \
         -boot d

Also ran it explicitly with the path to the binary.

/opt/homebrew/Cellar/qemu-virgl/20210507.1/bin/qemu-system-aarch64 ...

Screen Shot 2021-07-15 at 8 59 51 AM

The error from TianoCore is below.

BdsDxe: failed to load Boot0001 "UEFI Misc Device" from VenHw (93E34C7E-B50E-11DF-9223-2553DFD72085,00): Not Found
BdsDxe: failed to load Boot0002 "EUFI Misc Device 2" from PciRoot (0x0)/P{ci(0x6,0x0): Not Found
cfriedt commented 3 years ago
Screen Shot 2021-07-15 at 9 12 00 AM
cfriedt commented 3 years ago

Looks like there is a fix found elsewhere:

https://github.com/utmapp/UTM/issues/2333#issuecomment-786129411

cfriedt commented 3 years ago

Apparently this might have to do with UEFI secureboot

knazarov commented 3 years ago

You can try to enter the uefi settings and try to change the boot device from there. It could be that the boot order is different. It happened with me once, but I couldn’t reproduce it reliably. Also, be careful with edk2-arm-vars.fd, as this is the file that will contain firmware settings. Whatever you change in the uefi setup is reflected there, so it will be persistent even if you destroy your VM hard drive. If you need a fresh version, you’ll need to copy the original file again.