What is needed for running Gnome Boxes?

I have installed Gnome Boxes from flathub, but it does not work. I’m getting the following message when starting it: “Boxes cannot access the virtualization backend”. In the terminal I can see the following:

$ flatpak run org.gnome.Boxes 

(gnome-boxes:2): Gtk-WARNING **: 21:14:51.473: GtkFlowBox with a model will ignore sort and filter functions

(gnome-boxes:2): Gtk-WARNING **: 21:14:51.474: GtkListBox with a model will ignore sort and filter functions
Tracker-Message: 21:14:51.563: Could not get mtime for 'file:///home/lennart/.var/app/org.gnome.Boxes/cache/tracker/meta.db': Error when getting information for file “/home/lennart/.var/app/org.gnome.Boxes/cache/tracker/meta.db”: No such file or directory

(gnome-boxes:2): Tracker-WARNING **: 21:14:51.563: Falling back to bus backend, the direct backend failed to initialize: Could not open sqlite3 database:'/home/lennart/.var/app/org.gnome.Boxes/cache/tracker/meta.db': unable to open database file
Error setting up default broker: Unable to open qemu+unix:///session: Failed to connect socket to '/run/user/1000/libvirt/libvirt-sock': No such file or directory

(gnome-boxes:2): Boxes-WARNING **: 21:14:56.917: (/run/build/gnome-boxes/src/app.vala:446):boxes_app_setup_default_source_co: runtime check failed: (default_connection != null)

What do I have to do to set Boxes up correctly?

I am running gnome-boxes from the rpm-ostree repository and it works. It looks like the flatpak is missing some dependencies, or it might not be set up right for permissions to access the kvm or libvirtd services. You should probably open a bug report on the flatpak.

See also 1631033 – Silverblue 29 /etc/libvirt has wrong selinux label - if you want to run Virtual Machine Manager (virt-manager) you will also need to install gnome-boxes with rpm-ostree to get all the dependencies.

1 Like

I didn’t try boxes in the last 6 months, but the last time I tried it, I was not impressed. It is designed to be easier to run than virt-manager, but it still seems to have some bugs (like having a hard time connecting it to libvirtd/kvm), which appear on all distros it is installed.

I would also stick to virt-manager, though it is a bit more complex, because it provides a loot of features and gives a lot of control.

What version of Silverblue + Boxes are you using? I was just able to successfully install Boxes and run it on Silverblue 29, with no additional setup needed. There were some errors reported, but nothing fatal.

$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
● ostree://fedora-workstation:fedora/29/x86_64/silverblue
                   Version: 29.20180927.n.0 (2018-09-28 02:36:13)
                    Commit: 5800c36d92af84e671230773ba3f64ab341ee73d273dfecddbdd8657292a5911
              GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4

$ flatpak info org.gnome.Boxes/x86_64/stable
Ref: app/org.gnome.Boxes/x86_64/stable
ID: org.gnome.Boxes
Arch: x86_64
Branch: stable
Origin: flathub
Collection ID: org.flathub.Stable
Date: 2018-09-26 15:13:33 +0000
Subject: Enable Folder Sharing (8ddac0d8)
Commit: 56fe0f498817c7d9760e7ac0124b0e34fc8b9d9c0507651d6f28fa41e05c7dea
Parent: 42c879a2fc88ab78b1d974e2be20706c3e9bda97571be5fcb1ccd58a1b4fc24e
Location: /var/lib/flatpak/app/org.gnome.Boxes/x86_64/stable/56fe0f498817c7d9760e7ac0124b0e34fc8b9d9c0507651d6f28fa41e05c7dea
Installed size: 486.8 MB
Runtime: org.gnome.Platform/x86_64/3.28
Sdk: org.gnome.Sdk/x86_64/3.28

$ flatpak run org.gnome.Boxes

(gnome-boxes:2): Gtk-WARNING **: 09:49:40.518: GtkFlowBox with a model will ignore sort and filter functions

(gnome-boxes:2): Gtk-WARNING **: 09:49:40.519: GtkListBox with a model will ignore sort and filter functions
WaylandCompositor requires eglBindWaylandDisplayWL, eglUnbindWaylandDisplayWL and eglQueryWaylandBuffer.
Nested Wayland compositor could not initialize EGL
Tracker-Message: 09:49:40.674: Could not get mtime for 'file:///home/miabbott/.var/app/org.gnome.Boxes/cache/tracker/meta.db': Error when getting information for file “/home/miabbott/.var/app/org.gnome.Boxes/cache/tracker/meta.db”: No such file or directory

(gnome-boxes:2): Tracker-WARNING **: 09:49:40.675: Falling back to bus backend, the direct backend failed to initialize: Could not open sqlite3 database:'/home/miabbott/.var/app/org.gnome.Boxes/cache/tracker/meta.db': unable to open database file

This is the status of my system:

$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
● ostree://fedora-workstation:fedora/29/x86_64/silverblue
                   Version: 29.20180927.n.0 (2018-09-28 02:36:13)
                BaseCommit: 5800c36d92af84e671230773ba3f64ab341ee73d273dfecddbdd8657292a5911
              GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4
           LayeredPackages: ansible chrome-gnome-shell chromium pass

$ flatpak info org.gnome.Boxes/x86_64/stable
Ref: app/org.gnome.Boxes/x86_64/stable
ID: org.gnome.Boxes
Arch: x86_64
Branch: stable
Origin: flathub
Collection ID: org.flathub.Stable
Date: 2018-09-26 15:13:33 +0000
Subject: Enable Folder Sharing (8ddac0d8)
Commit: 56fe0f498817c7d9760e7ac0124b0e34fc8b9d9c0507651d6f28fa41e05c7dea
Parent: 42c879a2fc88ab78b1d974e2be20706c3e9bda97571be5fcb1ccd58a1b4fc24e
Location: /var/lib/flatpak/app/org.gnome.Boxes/x86_64/stable/56fe0f498817c7d9760e7ac0124b0e34fc8b9d9c0507651d6f28fa41e05c7dea
Installed size: 486,8 MB
Runtime: org.gnome.Platform/x86_64/3.28
Sdk: org.gnome.Sdk/x86_64/3.28

I tried layering gnome-boxes as well but it did not help :frowning:

Have you used virtualization before on this system? In case you haven’t, you can see if it is enabled by checking /proc/cpuinfo:

$ grep -wo -e vmx -e svm /proc/cpuinfo

It’s possible that the virtualization options are disabled at the BIOS level, so you might have to check in there as well.

This all supposes that Boxes is actually looking for these kinds of CPU flags, etc to enable virt support and is the root cause of the issue…but I could be sending you off in the completely wrong direction.

Also make sure you have /dev/kvm:

 INSERT  gunix  ~  ls -l /dev/kvm
crw-rw-rw-. 1 root kvm 10, 232 Sep 29 21:14 /dev/kvm

Virtualization seem to be enabled (I get vmx several times as output) and /dev/kvm is also there.

I was hoping, perhaps naively, that gnome-boxes would “just work” when installed as a flatpak. Do I have to set up any groups or something like that? I remember having to add myself to the libvirt group previously in order to run for example vagrant…?

I don’t know a lot about Boxes…but my test was done in a VM with a clean install of Silverblue 29…and now that I look closely, it doesn’t even have the virt flags on the CPU in the VM.

So I was just able to install it and run it successfully out of the box without any modifications. I know this doesn’t really help you any, but just reporting my own results. :frowning:

Sometimes I have this error to!

Seems like gnome-boxes fails to start libvirtd on sandbox. I dont why this occurs nor how to fix it, after a couple of tries it happens to work.

I had the same problem.

For me I added my user name to the libvirt group in /etc/group which fixed it.

libvirt:x:983:yourusernamehere

I hope this helps.

Cheers

Bill

GNOME Boxes developer here.

The flatpak should work by itself, no need for any extra setting. Some users seem to have permission issues with access to /dev/kvm, so you might want to check whether your user has r+w access to it, just like @billyb stated above. The flatpaked Boxes ships with its own libvirt daemon in the sandbox, so nothing you’d install with rpm-ostree will affect it. It would help me debug if you could share the output of

flatpak info org.gnome.Boxes

@feborges just replaced regular Fedora 29 with a clean installation of Silverblue 29. Boxes indeed works out of the box for me. Mostly.

I migrated a Windows 10 guest that I had on my old installation and it turns out screen auto-resizing of Windows no longer works, despite the guest having the QEMU guest agent. I vaguely remember having to install some additional server-side drivers on the Fedora host to get to work properly. Are some server parts missing in this Flatpak?

If you’re still using Wayland, try switching to GNOME on Xorg (or the other way around). I’ve had all sorts of annoying issues with Wayland - they’re probably GPU-related.

Does not seem Wayland or GPU related. Windows works just fine. I can set the resolution of the Windows guest to anything available and it’s fine. It just won’t automatically resize like it used to do with proper host ↔ guest communication. So it’s likely Flatpak related…

It seems like Boxes failed to automatically install the spice guest tools into your guest.

Could you please try to install spice-guest-tools on the Windows guest?
https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe

This installer contains some optional drivers and services that can be installed in Windows guest to improve SPICE performance and integration. This includes the qxl video driver and the SPICE guest agent (for copy and paste, automatic resolution switching, …)

I am now subscribed to the discourse notifications so I can get back to you faster.

It was already there from when I ran this same VM on my old host for the last 2 years, where automatic resolution switching worked just fine. I removed it and reinstalled it but no effect. I have copy/paste integration and even WebDav drives, but no automatic resolution switching.

Windows Device Manager is telling me it’s using “Microsoft Basic Display Adapter” though. Remarkably there is no mention of the QXL driver.

Could you please try installing the QXL driver manually? It is available in Download

I had the same issue with Boxes in Silverblue as the flatpak, and installed the tools manually. It will go through the motions of installing the guest tools, but I think it fails silently somewhere. I ran the flatpak from the terminal and got the following


And the list goes on.
Boxes loads, but the tools don’t appear to help me with USB ports with network devices. So I followed @znmeb regarding layering Boxes and when I did Virt-Manager began working, where before it was complaining about libvirt???-sock not accessible as if it is there but no permission to access. The USB ports are recognizing the communication cables I use now.

I too have given up on running Gnome Boxes right now. Besides the QXL driver issue, Windows 10 is simply unusable because it lags and hangs. While Windows itself isn’t too bad, both Internet Explorer and Word become unresponsive every few seconds. The mouse pointer becomes a spinner, indicating it’s doing something and the windows just become white squares.

Given all the feedback from everyone here I can’t escape the feeling that this is Flatpak related…