I’m having an issue starting my guest system in Virtual Machine Manager.
I first installed ver 38 of Bluefin-dx and then rebased to the latest version.
I created the Virtual Machine on the latest version (39) and it was working fine.
I then rebased back to the gts version and that’s when this issue started with the swtpm error message. I rebased back to version 39 hoping it was the version downgrade that caused the problem but the swtpm error persists.
Can someone help me get this fixed? I need the Virtual Machine functioning for work.
Here’s the error message from VMM when running ‘sudo virsh start image_name’.
Error starting domain: operation failed: swtpm died and reported: libvirt: error : cannot execute binary /usr/bin/swtpm: Permission denied
Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 72, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 108, 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 1402, in startup
self._backend.create()
File “/usr/lib64/python3.12/site-packages/libvirt.py”, line 1373, in create
raise libvirtError(‘virDomainCreate() failed’)
libvirt.libvirtError: operation failed: swtpm died and reported: libvirt: error : cannot execute binary /usr/bin/swtpm: Permission denied
check what is the SELinux fcontexts for /usr/bin/swtpm. We have a service for applying the right contexts on boot called swtpm-workaround.service in -dx.
That was the issue. The swtpm-workaround.service was not enabled. I fixed that and I no longer have the permission error. Thank you for helping me sort this out.
I can confirm it also happened on my Bluefin that rebased to :latest (with Fedora 40).
Well, my initial problem was that libvirt didn’t have permissions to create a log on /var/log/libvirt, and after fixing that, the swtpm error appeared.
I had to use these commands to fix the permissions for SELinux when trying to use VMM (or any virtual machine at all).
Looks like a few people have run into this error. We can probably setup something to auto run this on boot. Swtpm and VMs are pretty critical for the -dx experience.
If someone stumbles upon not being able to enable the network in VMM because it can’t create a folder below libvirt, you can apply the same SELinux command to it.