我正在关注这关于如何 GPU 直通的教程,但是当我到达大约 6:43 标记时,您按开始安装按钮,我收到以下错误:
Unable to complete install: 'internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile 'libvirt-5d739005-01d9-4c7c-9b41-bb3e3486c672' for '/usr/bin/qemu-system-x86_64': No such file or directory'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 2119, in _do_async_install
guest.installer_instance.start_install(guest, meter=meter)
File "/usr/share/virt-manager/virtinst/installer.py", line 419, in start_install
doboot, transient)
File "/usr/share/virt-manager/virtinst/installer.py", line 362, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python3/dist-packages/libvirt.py", line 3717, in createXML
if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirt.libvirtError: internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile 'libvirt-5d739005-01d9-4c7c-9b41-bb3e3486c672' for '/usr/bin/qemu-system-x86_64': No such file or directory
➜ ls /usr/bin | grep qemu
qemu-img
qemu-io
qemu-nbd
qemu-pr-helper
qemu-system-i386
qemu-system-x86_64
qemu-system-x86_64-spice
删除AppArmor
配置文件似乎不起作用。
内容/etc/apparmor.d/libvirt/libvirt-af16e645-e650-48c4-93fc-7b11c2a885a1.files
# DO NOT EDIT THIS FILE DIRECTLY. IT IS MANAGED BY LIBVIRT.
"/var/log/libvirt/**/win10.log" w,
"/var/lib/libvirt/qemu/domain-win10/monitor.sock" rw,
"/var/lib/libvirt/qemu/domain-3-win10/*" rw,
"/var/run/libvirt/**/win10.pid" rwk,
"/run/libvirt/**/win10.pid" rwk,
"/var/run/libvirt/**/*.tunnelmigrate.dest.win10" rw,
"/run/libvirt/**/*.tunnelmigrate.dest.win10" rw,
"/var/lib/libvirt/images/win10.qcow2" rwk,
"/home/ll931217/Downloads/Windows 10 Pro v.1709 En-US (64-bit) ACTiVATED-HOBBiT/Windows 10 Pro x64 En-US Activated.iso" rk,
"/usr/share/OVMF/OVMF_CODE.fd" rk,
# don't audit writes to readonly files
deny "/usr/share/OVMF/OVMF_CODE.fd" w,
"/var/lib/libvirt/qemu/nvram/win10_VARS.fd" rwk,
内容/etc/apparmor.d/libvirt/libvirt-af16e645-e650-48c4-93fc-7b11c2a885a1
#
# This profile is for the domain whose UUID matches this file.
#
#include <tunables/global>
profile libvirt-af16e645-e650-48c4-93fc-7b11c2a885a1 flags=(attach_disconnected) {
#include <abstractions/libvirt-qemu>
#include <libvirt/libvirt-af16e645-e650-48c4-93fc-7b11c2a885a1.files>
}
从昨天开始我一直在谷歌上搜索解决方案,但我找不到任何内容。这里有人知道为什么会出现这个错误吗?
答案1
在某种程度上似乎是一个错误,而不是你做错了什么。列出您的发行版、libvirt 和 qemu 版本可能会有所帮助。但也许可以通过禁用 apparmor 来解决这个问题/etc/libvirt/qemu.conf
:
security_driver = "none"
然后重启libvirtd