Incus not finding qemu-system-x86_64

New to incus, trying to get a VM started and have hit a wall.

On start I’m getting this error

Error: Failed creating instance record: Instance type “virtual-machine” is not supported on this server: QEMU command not available: exec: “qemu-system-x86_64”: executable file not found in $PATH

However; yes it in fact is.

>sudo qemu-system-x86_64 --version
QEMU emulator version 8.2.0 (qemu-kvm-8.2.0-11.el9_4.6)

This is running on Rocky Linux release 9.4 (Blue Onyx).

Originally I didn’t have the binary, found discussion of taking qemu-kvm and copying it with the rename, so that’s what’s sitting there. Wasn’t sure if that’s due to the project rename or it’s unavail for the RHEL flavor… whether valid or not remains to be seen.

I looked at the code, saw it’s likely failing the in path check here.

I wrote a simple go app to do the same test and it succeeds whether me, running sudo or as root.

Seems something not making it in the incus ENV so PATH isn’t complete, but that’s the limit of my understanding/guessing.

TIA

Welcome!

Incus uses its own package of Qemu. This is on Debian.

$ qemu-system-x86_64 --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.22)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
$ which qemu-system-x86_64
/usr/bin/qemu-system-x86_64
$ ls -l /opt/incus/bin/qemu-system-x86_64 
-rwxr-xr-x 1 root root 24876352 Sep   7 05:19 /opt/incus/bin/qemu-system-x86_64
$ 

Can you check that the person who packaged Qemu for RHEL/Rocky, included a separate Incus package for Qemu?

Actually, you do not need to check that, I can that do for you.

$ incus create images:rockylinux/9/cloud rocky --vm
Launching rocky
Error: Failed instance creation: This virtual machine image requires an agent:config disk be added
$ incus config device add rocky agent disk source=agent:config 
Device agent added to rocky
$ incus start rocky
$ incus shell rocky
Error: Instance is not running
$ incus shell rocky
Error: VM agent isn't currently running
$ incus shell rocky
[root@rocky ~]# dnf install 'dnf-command(copr)'
Rocky Linux 9 - BaseOS                          2.6 MB/s | 2.3 MB     00:00    
Rocky Linux 9 - AppStream                       4.0 MB/s | 8.0 MB     00:01    
Rocky Linux 9 - Extras                           41 kB/s |  15 kB     00:00    
Dependencies resolved.
================================================================================
 Package                      Arch       Version               Repository  Size
================================================================================
Installing:
 dnf-plugins-core             noarch     4.3.0-13.el9          baseos      36 k
Installing dependencies:
 dbus-libs                    x86_64     1:1.12.20-8.el9       baseos     151 k
 python3-dateutil             noarch     1:2.8.1-7.el9         baseos     287 k
 python3-dbus                 x86_64     1.2.18-2.el9.0.1      baseos     131 k
 python3-dnf-plugins-core     noarch     4.3.0-13.el9          baseos     246 k
 python3-systemd              x86_64     234-18.el9            baseos      83 k

Transaction Summary
================================================================================
Install  6 Packages

Total download size: 934 k
Installed size: 2.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): python3-dnf-plugins-core-4.3.0-13.el9.no 438 kB/s | 246 kB     00:00    
(2/6): dnf-plugins-core-4.3.0-13.el9.noarch.rpm  61 kB/s |  36 kB     00:00    
(3/6): dbus-libs-1.12.20-8.el9.x86_64.rpm       1.0 MB/s | 151 kB     00:00    
(4/6): python3-dbus-1.2.18-2.el9.0.1.x86_64.rpm 1.2 MB/s | 131 kB     00:00    
(5/6): python3-systemd-234-18.el9.x86_64.rpm    276 kB/s |  83 kB     00:00    
(6/6): python3-dateutil-2.8.1-7.el9.noarch.rpm  330 kB/s | 287 kB     00:00    
--------------------------------------------------------------------------------
Total                                           821 kB/s | 934 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : dbus-libs-1:1.12.20-8.el9.x86_64                       1/6 
  Installing       : python3-dbus-1.2.18-2.el9.0.1.x86_64                   2/6 
  Installing       : python3-systemd-234-18.el9.x86_64                      3/6 
  Installing       : python3-dateutil-1:2.8.1-7.el9.noarch                  4/6 
  Installing       : python3-dnf-plugins-core-4.3.0-13.el9.noarch           5/6 
  Installing       : dnf-plugins-core-4.3.0-13.el9.noarch                   6/6 
  Running scriptlet: dnf-plugins-core-4.3.0-13.el9.noarch                   6/6 
  Verifying        : python3-dnf-plugins-core-4.3.0-13.el9.noarch           1/6 
  Verifying        : dnf-plugins-core-4.3.0-13.el9.noarch                   2/6 
  Verifying        : python3-dateutil-1:2.8.1-7.el9.noarch                  3/6 
  Verifying        : python3-systemd-234-18.el9.x86_64                      4/6 
  Verifying        : dbus-libs-1:1.12.20-8.el9.x86_64                       5/6 
  Verifying        : python3-dbus-1.2.18-2.el9.0.1.x86_64                   6/6 

Installed:
  dbus-libs-1:1.12.20-8.el9.x86_64                                              
  dnf-plugins-core-4.3.0-13.el9.noarch                                          
  python3-dateutil-1:2.8.1-7.el9.noarch                                         
  python3-dbus-1.2.18-2.el9.0.1.x86_64                                          
  python3-dnf-plugins-core-4.3.0-13.el9.noarch                                  
  python3-systemd-234-18.el9.x86_64                                             

Complete!
[root@rocky ~]# dnf copr enable ganto/lxc4
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
<https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr>,
and packages are not held to any quality or security level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.

Do you really want to enable copr.fedorainfracloud.org/ganto/lxc4? [y/N]: y
Error: It wasn't possible to enable this project.
Repository 'epel-9-x86_64' does not exist in project 'ganto/lxc4'.
Available repositories: 'fedora-38-ppc64le', 'fedora-rawhide-aarch64', 'fedora-40-x86_64', 'fedora-41-s390x', 'fedora-rawhide-s390x', 'fedora-38-x86_64', 'fedora-rawhide-x86_64', 'fedora-39-ppc64le', 'fedora-38-s390x', 'fedora-41-x86_64', 'fedora-39-s390x', 'fedora-40-ppc64le', 'fedora-41-aarch64', 'fedora-rawhide-ppc64le', 'fedora-40-aarch64', 'fedora-38-aarch64', 'fedora-40-s390x', 'fedora-39-aarch64', 'fedora-41-ppc64le', 'fedora-39-x86_64'

If you want to enable a non-default repository, use the following command:
  'dnf copr enable ganto/lxc4 <repository>'
But note that the installed repo file will likely need a manual modification.
[root@rocky ~]# 

I am stuck here. How did you install Incus on Rocky 9?

I’m not sure how it got installed, I’m reaching back to find that out. This is a team cluster in testing to be a sandbox. I don’t see where the source material for install is coming from and it doesn’t point to a repo (just commandline) so I’ll get back to you on that.

Is there a means of telling otherwise?

I am not familiar with Fedora/Rocky. The installation command might appear in the command history.

Here are steps that I leant from RockyLinux community. (I haven’t tried them myself though).

dnf -y install epel-release
dnf config-manager --enable crb
dnf copr enable neil/incus
dnf install incus

Optional:

dnf install incus-tools

Worth a bookmark. It’s constantly evolving: https://docs.rockylinux.org/ I believe a dedicated page for incus is in the works. RockyLinux community is very lively and active. Would certainly recommend joining :slight_smile:

How to install Incus - Incus documentation now has Rocky Linux instructions.

1 Like

@simos I found the build job that creates our rpm.

What exactly am I looking for. What I see is it runs the build rpmbuild -ba ${HOME}/rpmbuild/SPECS/incus.spec and inside the spec file is a boatload of things but the only ref to qemu is in a recommends block:

Requires:       incus%{?_isa} = %{version}-%{release}
# Virtual machine support requires additional packages
Recommends:     edk2-ovmf
Recommends:     xorriso
Recommends:     qemu-char-spice
Recommends:     qemu-device-display-virtio-vga
Recommends:     qemu-device-display-virtio-gpu
Recommends:     qemu-device-usb-redirect
Recommends:     qemu-img
Recommends:     qemu-kvm-core

@stgraber posted above the new instructions on installing Incus on Rocky Linux.It’s a new packaging by Neil Hanlon, and there’s a link there on how to submit issues.

You need to identify which Incus packaging (all are currently unofficial for Rocky) you are using, whether it’s the old ganto/lxc4 or the new neil/incus. You may have to switch to Neil’s packages.

Then, you would need to file an issue at Neil’s repository.

I installed Incus on Rocky (in an Incus VM). I could not get Incus to start the service, though it’s most probably something related to me not known how to use Rocky.

1 Like

Ugh… have you tried turning it off/on again?

Not kidding.

Despite all the testing I did, the one thing I didn’t try was restarting the service. Apparently that’s why it couldn’t find the binary, because it had an outdated env.

Restart, ooh look, new error but is specifically related to a parameter switch that qemu-kvm doesn’t have (remember I haven’t yet found an RPM for R9 with qemu-system-x86_64) so the actual start call fails.

Thanks all!

1 Like