8

Since yesterday, I can't view any running VMs (QEMU/KVM) with my virt-manager GUI any more. When I try to view the screen of a VM in its built-in viewer, I get this error message instead:

Error connecting to graphical console:
internal error: unable to execute QEMU command 'getfd':
No file descriptor supplied via SCM_RIGHTS

This applies to all of my VMs.

I can still correctly view and interact with my VMs in virt-viewer though, only the virt-manager built-in viewer is dead.

What is wrong here and how can I fix it?

Edit: I just found out I am using virt-manager version 1:1.4.0-1~getdeb1 from the archive.getdeb.net repo.

Byte Commander
  • 110,243

4 Answers4

12

In working to try to Merge the latest virt-manager 1.4.0 to Ubuntu I came across this same issue. It does not appear to be a bug in virt-manager just a change how it sends display data to VMs.

I've opened a bug to add the necessary permissions to libvirt which is where the apparmor profiles are defined - https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1668681

To fix this issue without disabling security append:

# allow connect with openGraphicsFD to work
unix (send, receive) type=stream addr=none peer=(label=/usr/sbin/libvirtd),

to the file /etc/apparmor.d/abstractions/libvirt-qemu but not in the qemu-bridge-helper section. (So right after "owner @{PROC}/0-9*/fd/ r,")

Then reload the profiles with sudo systemctl reload apparmor.

Having said all that, I always do recommend using the packages from our archive for best support.

sierrasdetandil
  • 2,681
  • 1
  • 26
  • 25
gQuigs
  • 475
2

In my case, it was apparmour preventing access. The apparmour magic profile generator doesn't seem to be working as it should. My workaround is as follows.

After starting the KVM instance and receiving the error, I did:

$sudo apparmour_status

which listed the profile causing the issue,

libvirt-<some long key> 

Then I set the apparmour profile to complain instead of enforce with:

$sudo aa-complain /etc/apparmor.d/libvirt/libvirt-<some long key>

Now I no longer receive the error. Hope this conflict gets fixed.

Mischa
  • 21
1

I could not reproduce the problem, but there were updates for libvirt on October, 5th :

libvirt-bin-1.3.1-1ubuntu10.2 was upgraded to libvirt-bin-1.3.1-1ubuntu10.3
libvirt0-1.3.1-1ubuntu10.2 was upgraded to libvirt01.3.1-1ubuntu10.3

If you did not change any settings or anything else, most probably something went wrong during the upgrade process. Completely remove all virt-manager related packages and reinstall them.

sudo apt purge libvirt-bin libvirt-glib libvirt0 virt-manager virt-viewer virtinst  
sudo apt install libvirt-bin libvirt-glib libvirt0 virt-manager virt-viewer virtinst  

Reboot the host operating system - now everything should work properly as it did before.

cl-netbox
  • 31,491
0

Seems like a bug in virt-manager version 1:1.4.0-1~getdeb1 from http://getdeb.net.

Downgrading the package again to the latest version available from the official repos (1:1.3.2-3ubuntu1.16.04.2 from xenial-updates) fixes this.

Update: Version 1:1.4.0-1~getdeb2 didn't fix this issue yet.

Byte Commander
  • 110,243