What is needed for running Gnome Boxes?

flatpak
boxes

#1

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?


#2

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 https://bugzilla.redhat.com/show_bug.cgi?id=1631033 - 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.


#3

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.


#4

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

#5

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:


#6

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.


#7

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

#8

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…?


#9

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:


#10

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.