flathub / flathub/org.gnome.Boxes

Error on start qemu socket when reinstall ('No KVM' message)

Open
#99 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
15
Forks
12
PR merge metrics
No merged PRs in 30d

Description

When reinstall Gnome Boxes from Flatpak can not install any vm, the app says "No KVM" but have KVM in host machine:

```bash
$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
```

I try find the problem:

```
$ flatpak run org.gnome.Boxes
Ignoring /app/share/osinfo/.ref with missing '.xml' extension

(org.gnome.Boxes:2): GLib-CRITICAL **: 00:12:43.775: g_variant_new_string: assertion 'string != NULL' failed
Ignoring /app/share/osinfo/manifest.json with missing '.xml' extension

(org.gnome.Boxes:2): Boxes-WARNING **: 00:12:47.149: util-app.vala:448: Failed to execute: virsh capabilities
```

```bash
$ git clone https://gitlab.gnome.org/GNOME/gnome-boxes.git
cd gnome-boxes/
$ grep 'No KVM' . -iR
./NEWS:- Fix 'No KVM' warning visibility issues.
./src/vm-configurator.vala: // No KVM-enabled guest caps :( We at least need Qemu
./src/assistant/assistant.vala: show_error ("No KVM!\n");
```

In `./src/assistant/assistant.vala`:

```
private async void setup (string path) {
if (!yield check_libvirt_kvm ()) {
show_error ("No KVM!\n");
return;
}
```

Find the checker:

```
$ grep 'check_libvirt_kvm' . -iR
./src/util-app.vala: public async bool check_libvirt_kvm () {
```

In `./src/util-app.vala`:

```
public async bool check_libvirt_kvm () {
try {
string standard_output;

string[] argv = {"virsh", "capabilities"};

yield exec (argv, null, out standard_output);
int index = standard_output.index_of ("

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing `virsh capabilities` inside the Flatpak shell and compare it with the host result. Read `src/assistant/assistant.vala` and `src/util-app.vala`, especially `setup()` and `check_libvirt_kvm()`, then trace how the bundled libvirt socket is started. Done means identifying and resolving the Flatpak startup failure so the KVM check succeeds, with verification of VM creation.

Written by the indexing model from the issue text.

Assessment

Domain
infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.