首页 > 解决方案 > qemu-system-aarch64:-accel hvf:加速器 hvf 无效

问题描述

我已经在 MacBook pro M1 中自己编译了 QEMU,并下载了 ubuntu 20.04。

当我尝试通过以下方式安装 ubuntu 时:

DYLD_LIBRARY_PATH=. \
./qemu-system-aarch64 \
-M virt,highmem=off \
-accel hvf \
-m 4G \
-smp 4 \
-cpu max \
-drive file=ubuntu.img,index=0,media=disk,format=raw \
-serial stdio \
-netdev type=user,id=net0 \
-device virtio-gpu-pci -vga none \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-tablet \
-device intel-hda -device hda-duplex \
-device virtio-net-pci,netdev=net0,romfile="" \
-drive file=ubuntu-20.04.2-live-server-arm64.iso,media=cdrom,if=none,id=cdrom -device usb-storage,drive=cdrom \
-bios QEMU_EFI.fd

我得到一个错误:qemu-system-aarch64: -accel hvf: invalid accelerator hvf

我试过这个:sudo xattr -rd com.apple.quarantine ~/Desktop/buildV6关闭看门人,但它没有用。

我不太明白这一点,我是 QEMU 的新手。你能给我解决方案吗?

标签: qemuapple-m1

解决方案


我发现https://github.com/knazarov/homebrew-qemu-virgl是最简单的解决方案:

brew install qemu

brew install knazarov/qemu-virgl/qemu-virgl

推荐阅读