Log when starting a KVM VM with 'virt-manager':
--
Error starting domain: internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile 'libvirt-a1937a46-2b13-41bd-998b-27ee9a8209a8' for '/usr/bin/kvm-spice': No such file or directory
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1508, in startup
self._backend.create()
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1062, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile 'libvirt-a1937a46-2b13-41bd-998b-27ee9a8209a8' for '/usr/bin/kvm-spice': No such file or directory
--
But the AppArmor profiles exist:
--
$ sudo ls -lah /etc/apparmor.d/libvirt/libvirt-*
-rw-r--r-- 1 root root 293 août 16 23:04 /etc/apparmor.d/libvirt/libvirt-a1937a46-2b13-41bd-998b-27ee9a8209a8
-rw-r--r-- 1 root root 1,8K août 16 23:05 /etc/apparmor.d/libvirt/libvirt-a1937a46-2b13-41bd-998b-27ee9a8209a8.files
$
--
I checked paths the VM relies on (CD-ROM ISOs absolute paths) and they contain no whitespaces.
Tell me if the virt-manager VM XML file is needed for troubleshooting.
A troubleshooting sequence I tried, with no positive result:
1/ Deeply-deleting '*ibvir*' in '/etc/apparmor.d'
2/ Reinstalling the 'libvirt-bin' and its dependencies (incl. 'libvirt-daemon-system'), by providing the 'confmiss' DPKG flag: it restored anything libvirt-related in '/etc/apparmor.d'
2.b/ Did 1/ and 2/ for the 'qemu-kvm' and 'virt-manager' packages also
3/ Reloaded the 'apparmor' systemd daemon
4/ Rebooted machine
5/ Reloaded daemons ('daemon-reload'), the 'libvirtd' and 'qemu-kvm' systemd daemons
6/ Retried to start the VM
I reproduce the same on 18.04 LTS:
Log when starting a KVM VM with 'virt-manager': a1937a46- 2b13-41bd- 998b-27ee9a8209 a8' for '/usr/bin/ kvm-spice' : No such file or directory
--
Error starting domain: internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile 'libvirt-
Traceback (most recent call last): virt-manager/ virtManager/ asyncjob. py", line 89, in cb_wrapper asyncjob, *args, **kwargs) virt-manager/ virtManager/ asyncjob. py", line 125, in tmpcb virt-manager/ virtManager/ libvirtobject. py", line 82, in newfn virt-manager/ virtManager/ domain. py", line 1508, in startup _backend. create( ) python2. 7/dist- packages/ libvirt. py", line 1062, in create a1937a46- 2b13-41bd- 998b-27ee9a8209 a8' for '/usr/bin/ kvm-spice' : No such file or directory
File "/usr/share/
callback(
File "/usr/share/
callback(*args, **kwargs)
File "/usr/share/
ret = fn(self, *args, **kwargs)
File "/usr/share/
self.
File "/usr/lib/
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile 'libvirt-
--
But the AppArmor profiles exist: d/libvirt/ libvirt- * d/libvirt/ libvirt- a1937a46- 2b13-41bd- 998b-27ee9a8209 a8 d/libvirt/ libvirt- a1937a46- 2b13-41bd- 998b-27ee9a8209 a8.files
--
$ sudo ls -lah /etc/apparmor.
-rw-r--r-- 1 root root 293 août 16 23:04 /etc/apparmor.
-rw-r--r-- 1 root root 1,8K août 16 23:05 /etc/apparmor.
$
--
I checked paths the VM relies on (CD-ROM ISOs absolute paths) and they contain no whitespaces.
Tell me if the virt-manager VM XML file is needed for troubleshooting.
A troubleshooting sequence I tried, with no positive result: daemon- system' ), by providing the 'confmiss' DPKG flag: it restored anything libvirt-related in '/etc/apparmor.d'
1/ Deeply-deleting '*ibvir*' in '/etc/apparmor.d'
2/ Reinstalling the 'libvirt-bin' and its dependencies (incl. 'libvirt-
2.b/ Did 1/ and 2/ for the 'qemu-kvm' and 'virt-manager' packages also
3/ Reloaded the 'apparmor' systemd daemon
4/ Rebooted machine
5/ Reloaded daemons ('daemon-reload'), the 'libvirtd' and 'qemu-kvm' systemd daemons
6/ Retried to start the VM
Could a dependency package be the cause of it?