我遇到了这个问题。我有一个 ryzen 系统(Ubuntu 24.04),我查看了 BIOS 设置,发现 SVM 已启用。
我按照此页面上的初始步骤安装了 KVM,但在第 4 步执行时sudo systemctl status libvirtd
,我得到:
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: enabled)
Active: active (running) since Sun 2025-01-05 12:52:55 EST; 1min 5s ago
TriggeredBy: ● libvirtd-ro.socket
● libvirtd.socket
● libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Main PID: 8460 (libvirtd)
Tasks: 22 (limit: 32768)
Memory: 20.7M (peak: 25.7M)
CPU: 413ms
CGroup: /system.slice/libvirtd.service
├─1484 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/li>
├─1485 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/li>
└─8460 /usr/sbin/libvirtd --timeout 120
Jan 05 12:52:55 linux-mini systemd[1]: Starting libvirtd.service - libvirt legacy monolithic daemon...
Jan 05 12:52:55 linux-mini systemd[1]: Started libvirtd.service - libvirt legacy monolithic daemon.
Jan 05 12:52:55 linux-mini dnsmasq[1484]: read /etc/hosts - 8 names
Jan 05 12:52:55 linux-mini dnsmasq[1484]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names
Jan 05 12:52:55 linux-mini dnsmasq-dhcp[1484]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Jan 05 12:52:55 linux-mini libvirtd[8460]: libvirt version: 10.0.0, package: 10.0.0-2ubuntu8.5 (Ubuntu)
Jan 05 12:52:55 linux-mini libvirtd[8460]: hostname: linux-mini
Jan 05 12:52:55 linux-mini libvirtd[8460]: Unable to open /dev/kvm: No such file or directory
因此有某些因素阻止 kvm 启动(?——不确定是否正确)。
sudo dmesg | grep kvm
显示:
[ 4.403905] kvm_amd: NX (Execute Disable) not supported
[ 409.676621] kvm_amd: NX (Execute Disable) not supported
我不知道这告诉我什么。 lsmod | grep kvm
显示:
kvm 1404928 0
irqbypass 12288 1 kvm
我正在尝试运行 Android 模拟器,但这显然阻止了这一切的发生。欢迎任何指点。