2

I just found an app on Discover Store (Flatpak) that is called "Virtual Machine Manager". So I've downloaded it, because I want to try and make a Windows 11 VM with it.

But as soon as I go to "File > Add Connection" and choose a connection, then I get the following error popup:

Unable to connect to libvirt qemu:///system.

Verify that an appropriate libvirt daemon is running.

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/app/share/virt-manager/virtManager/connection.py", line 932, in _do_open
    self._backend.open(cb, data)
  File "/app/share/virt-manager/virtinst/connection.py", line 171, in open
    conn = libvirt.openAuth(self._open_uri,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.12/site-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory

Is the app just broken on flatpak or maybe I chose the wrong connection?

I even tried uninstalling the app and reinstalling it. The app definitely installed correctly as far as I can tell. It's launching without any issues.


Any help would be very much appreciated in order to get the app working and having a Windows 11 VM working.

I'm very new to the app and don't really know anything. I tested this on two different operating systems: SteamOS and KDE Linux. And on both of them I have the same issue.

1
  • You have to install libvirt wiki.archlinux.org/title/Libvirt to be able to use the qemu:///system connection. Commented Aug 20 at 13:40

3 Answers 3

1

Not all aspects of every application might work in an containerized / isolating environment such as flatpak. On top of that, your user needs to be permitted to even talk to the system bus like that. That's not the case by default (you can change that by adding yourself to a group, but even then I wouldn't be sure that flatpak allows to portal through to the system D-Bus).

To run a VM interactively you'd generally use the user session bus, not the system bus – it's not like you need that VM to run to boot your system or anything; it's actually software that you want to run for yourself.

Generally, virt-manager (that's probably the package name) runs just fine natively and is well-packaged; the functionally interesting part is anyways the libvirtd daemon, not the GUI, that actually sets up and operates the VMs.

So, virt-manager in a flatpak alone probably won't do – you need to run libvirtd. I don't think that's usually done within a flatpak, but needs to be done on the host machine anyways. (The git repo behind that flatpak does mention that, the flathub page doesn't…).

So frankly, I'd skip this flatpak, uninstall it, then use your Linux distro's package manager (I'm not familiar with SteamOS, and I think there's no "KDE Linux", just KDE-desktop oriented Linux distros, like Fedora KDE spin, SuSE, Kubuntu…) to just install virt-manager. Typically, you'll be recommended (or automatically made) to install the necessary libvirt backend toolings.

6
  • I'm running KDE Linux OS (kde.org/linux) and SteamOS (store.steampowered.com/steamos). I'm running SteamOS on two computers and KDE Linux on three computers. They're both Arch Based as far as I'm aware. Commented Aug 20 at 13:32
  • Sorry for all the questions, but why would it be published onto flatpak if it doesn't work with flatpak? Commented Aug 20 at 13:34
  • @ShaunRoselt I learned of a new Linux distro today :) thanks! Commented Aug 20 at 13:35
  • I went with KDE Linux because from what I read online, it's very similar to SteamOS, but without the Gaming Mode and wider hardware support. Commented Aug 20 at 13:37
  • @ShaunRoselt as said, it can work with further measures (see the git repo link). It doesn't mean that's useful to you, but especially in the context of development, getting half-useful or limited-audience useful software published can be very interesting. Generally, you cannot infer from something being available that something works. Think about this: annually, about 2 million books are published. How many of these do you think are new, good, well-written or useful? How many are just… published, not sold more than five times? Commented Aug 20 at 13:38
1

For Arch-based systems like SteamOS:

  1. Make sure you have all necessary software:
    sudo pacman -S libvirt libvirt-dbus qemu-full
    
  2. Make sure your user is a member of the libvirt group:
    sudo usermod -a -G libvirt userName
    
1

This is what I ended up needing to do in order to add a connection. I had to run the following commands:

  1. sudo pacman -S libvirt libvirt-dbus qemu-full
  2. sudo usermod -a -G libvirt shaunroselt with "shaunroselt" being my username.
  3. sudo systemctl enable libvirtd.service
  4. sudo systemctl start libvirtd.service

And now I'm able to successfully add connections without the error popup.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.