You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在AMD64宿主机上部署AArch64虚拟机时遭遇‘invalid accelerator kvm’错误及镜像格式警告的技术求助

在AMD64宿主机上部署AArch64虚拟机时遭遇‘invalid accelerator kvm’错误及镜像格式警告的技术求助

大家好,我第一次尝试在自己的AMD64台式机上模拟ARM64虚拟机做测试,完全是新手一枚,摸索着找了参考示例来抄。

我参考了一个Ubuntu的ARM64 QEMU配置示例,原命令是这样的:

$ sudo qemu-system-aarch64 -enable-kvm -m 1024 -cpu host -M virt -nographic -pflash /usr/share/AAVMF/AAVMF_CODE.fd -pflash flash1.img -drive if=none,file=jammy-server-cloudimg-arm64.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=$randmac

我根据自己的需求调整了命令,主要是加大了内存,换成了自己从现有实例复制来的raw镜像文件,调整后的命令如下:

qemu-system-aarch64 -enable-kvm -m 4096 -cpu host -M virt -pflash /usr/share/AAVMF/AAVMF_CODE.fd -pflash flash1.img -drive if=none,file=sal3.internal.raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=$randmac

现在我遇到两个问题,其中KVM的错误是当前的核心障碍:

  • 镜像格式警告:因为我没有用示例里的CD镜像,而是直接用了raw格式的实例镜像,QEMU三次抛出以下警告:

WARNING: Image format was not specified for 'sal3.internal.raw' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.

这个问题我打算等核心问题解决后再处理,但目前更紧急的是第二个问题:

  • KVM加速器错误:命令执行后直接报错:
qemu-system-aarch64: invalid accelerator kvm

我照着示例加了-enable-kvm参数,原示例看起来默认KVM能支持AMD64宿主机模拟AArch64虚拟机,但现在却报错了,我完全不知道该从哪里入手排查。

有没有大佬能给点提示?谢谢!

备注:内容来源于stack exchange,提问作者Michael Jinks

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 13:08:01