Skip to content

Conversation

@loacker-dev
Copy link
Contributor

This commit extends the list of virtiofsd binary locations. This change enables running a bootc container as an ephemeral VM on Arch Linux, as the Arch package installs the virtiofsd binary in /usr/lib/virtiofsd.

bcvk is crashing because it cannot locate the virtiofsd binary.

$ ./bcvk-x86_64-unknown-linux-gnu ephemeral run --rm -K --name mytestvm quay.io/fedora/fedora-bootc:42
Error:
   0: virtiofsd binary not found. Searched paths: /usr/libexec/virtiofsd, /usr/bin/virtiofsd, /usr/local/bin/virtiofsd. Please install virtiofsd.
   
Location:
   crates/kit/src/qemu.rs:893
   
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

The virtiofsd package files are listed here. On Arch Linux, the virtiofsd binary is found at /usr/lib/virtiofsd.

$ pacman -Ql virtiofsd
virtiofsd /usr/ 
virtiofsd /usr/lib/
virtiofsd /usr/lib/virtiofsd
virtiofsd /usr/share/
virtiofsd /usr/share/doc/
virtiofsd /usr/share/doc/virtiofsd/
virtiofsd /usr/share/doc/virtiofsd/README.md
virtiofsd /usr/share/doc/virtiofsd/migration.md
virtiofsd /usr/share/doc/virtiofsd/xattr-mapping.md
virtiofsd /usr/share/licenses/
virtiofsd /usr/share/licenses/virtiofsd/
virtiofsd /usr/share/licenses/virtiofsd/LICENSE-APACHE
virtiofsd /usr/share/licenses/virtiofsd/LICENSE-BSD-3-Clause
virtiofsd /usr/share/qemu/
virtiofsd /usr/share/qemu/vhost-user/
virtiofsd /usr/share/qemu/vhost-user/50-virtiofsd.json

I implemented a temporary workaround by creating a symlink to /usr/local/bin/virtiofsd.

$ sudo ln -s /usr/lib/virtiofsd /usr/local/bin/virtiofsd
$ ./bcvk-x86_64-unknown-linux-gnu ephemeral run -d --rm -K --name mytestvm quay.io/fedora/fedora-bootc:42
4250423d0f016ed3c84c3325232d20b7640c95afd814bfe2acdfc2bcdbd37f62
$ ./bcvk-x86_64-unknown-linux-gnu ephemeral ssh mytestvm
[root@fedora ~]# 

This commit extends the list of virtiofsd binary locations.
This change enables running a bootc container as an ephemeral VM on Arch Linux,
as the Arch package installs the virtiofsd binary in /usr/lib/virtiofsd.

Signed-off-by: Matteo Piccinini (loacker) <[email protected]>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly extends the search paths for the virtiofsd binary to include the location used on Arch Linux, fixing the reported issue. My review includes a suggestion to make this binary discovery more robust by searching the system's PATH first, which would improve compatibility with other Linux distributions without future code changes.

Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks sane to me!

One thing this intersects with a bit is #124 - we could try extending our test suite for different host OSes by running them as a container. That one needs a bit of work.

Another approach I've been thinking about is to try always doing libvirt-in-container for ephemeral.

@cgwalters cgwalters enabled auto-merge (rebase) November 25, 2025 21:38
@cgwalters cgwalters merged commit 5709b13 into bootc-dev:main Nov 25, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants