![由于 Apparmor,无法启动带有 SDL 显示的 QEMU VM:无法加载 AppArmor 配置文件“libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4”](https://linux22.com/image/950802/%E7%94%B1%E4%BA%8E%20Apparmor%EF%BC%8C%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%E5%B8%A6%E6%9C%89%20SDL%20%E6%98%BE%E7%A4%BA%E7%9A%84%20QEMU%20VM%EF%BC%9A%E6%97%A0%E6%B3%95%E5%8A%A0%E8%BD%BD%20AppArmor%20%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E2%80%9Clibvirt-32963ecb-fd2f-454c-93a6-c818af618ba4%E2%80%9D.png)
我正在尝试使用 SDL 作为显示器而不是 spice 服务器在 virt-manager 中运行我的虚拟机。
虚拟机使用 spice 完美启动,但当我将其显示切换到 SDL 时,出现以下错误:
Error starting domain: internal error: cannot load AppArmor profile 'libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4'`
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1329, in startup
self._backend.create()
File "/usr/lib/python3/dist-packages/libvirt.py", line 1353, in create
raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: cannot load AppArmor profile 'libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4'
包含“libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4”的目录如下所示:
/etc/apparmor.d/libvirt$ ls -l
-rw-r--r-- 1 root root 293 Dec 26 00:21 libvirt-04e1e00e-eb6c-4b5a-b04d-87769a1a5d2d
-rw-r--r-- 1 root root 293 Jan 1 17:41 libvirt-072dbf37-2bb3-4ddc-b87b-f10d3fd3049e
-rw-r--r-- 1 root root 293 Jan 1 17:37 libvirt-2b6671ef-6184-4b22-88bc-ca532d45d170
-rw-r--r-- 1 root root 293 Jan 3 22:03 libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4
-rw-r--r-- 1 root root 293 Jan 1 19:35 libvirt-6c092a74-1ef9-4c97-8f6c-be22eda71193
-rw-r--r-- 1 root root 293 Dec 26 00:20 libvirt-915f59ee-3a52-4eb1-a43e-35be01a41b16
-rw-r--r-- 1 root root 581 Dec 26 00:20 libvirt-915f59ee-3a52-4eb1-a43e-35be01a41b16.files
-rw-r--r-- 1 root root 293 Jan 1 19:50 libvirt-c871c97c-92ef-4c23-b75a-8fab2e8678e3
-rw-r--r-- 1 root root 342 Jan 15 2021 TEMPLATE.lxc
-rw-r--r-- 1 root root 192 Jan 15 2021 TEMPLATE.qemu
和'libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4':
#
# This profile is for the domain whose UUID matches this file.
#
#include <tunables/global>
profile libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4 flags=(attach_disconnected) {
#include <abstractions/libvirt-qemu>
#include <libvirt/libvirt-32963ecb-fd2f-454c-93a6-c818af618ba4.files>
}
我注意到该目录不包含文件所建议的“ibvirt-32963ecb-fd2f-454c-93a6-c818af618ba4.files”,但我不确定如何生成它。
我尝试重新安装 QEMU/KVM/libvirt 堆栈和 Apparmor,但没有成功。
由于我有点陷入了死胡同,任何指点都会有帮助。
谢谢 :)