boxed plugin and virtiofs-sharing not working

20 views
Skip to first unread message

Till Dörges

unread,
Dec 8, 2024, 3:51:47 PM12/8/24
to kiwi-...@googlegroups.com
Dear all,

we're using Kiwi and the boxed plugin with a local version of the Leap box
(https://download.opensuse.org/repositories/Virtualization:/Appliances:/SelfContained:/leap/images/)
to build an ISO image.

Generally things are working. :-)


However, when adding --virtiofs-sharing building doesn't work anymore:

kiwi-ng ... system boxbuild ... --virtiofs-sharing -- ...


The first issue (on a Debian 12 host) was

--- snip ---
KiwiBoxPluginVirtioFsError: virtiofsd not found in: ['/usr/lib/virtiofsd',
'/usr/libexec']'
--- snip ---

which I could work around with

ln -s /usr/lib/qemu/virtiofsd /usr/libexec/virtiofsd


But after that I run into "Failed to connect to '/tmp/vhostqemu_0'":

--- snip ---
kiwi-ng --logfile mybuild.log --type iso system boxbuild --box localleap
--virtiofs-sharing -- --description /my/builddir --target-dir /my/builddir
--signing-key /my/buildkeys/gpg-pubkey-0E203798.asc --signing-key
/my/buildkeys/gpg-pubkey-25db7ae0-645bae34.asc --signing-key
/my/buildkeys/gpg-pubkey-29b700a4-62b07e22.asc --signing-key
/my/buildkeys/gpg-pubkey-39db7c82-5847eb1f.asc --signing-key
/my/buildkeys/gpg-pubkey-3dbdc284-53674dd4.asc --signing-key
/my/buildkeys/gpg-pubkey-3fa1d6ce-63c9481c.asc --signing-key
/my/buildkeys/gpg-pubkey-65176565-61a0ee8f.asc

fuse: invalid argument `/my/builddir'
fuse: invalid argument `/my/builddir'
qemu-system-x86_64: -chardev socket,id=char0,path=/tmp/vhostqemu_0: Failed to connect
to '/tmp/vhostqemu_0': No such file or directory
[ ERROR ]: 21:35:24 | KiwiError: Box build failed. Find build log at:
'/my/builddir/result.log'
--- snip ---

'/my/builddir/result.log' doesn't actually exist.


I've read
https://osinside.github.io/kiwi/plugins/self_contained.html#sharing-backends and know
that virtiofs support is considered experimental. ;-)


Still any hints on how to debug this would be appreciated!


Thanks and regards -- Till
--
www.pre-sense.de/fcknzs

PRESENSE Technologies GmbH Nagelsweg 41, D-20097 HH
Geschäftsführer/Managing Director AG Hamburg, HRB 107844
Till Dörges USt-IdNr.: DE263765024

Marcus Schäfer

unread,
Dec 10, 2024, 7:32:16 AM12/10/24
to kiwi-...@googlegroups.com
Hi Till,

> Generally things are working. :-)

Generally ;)

> However, when adding --virtiofs-sharing building doesn't work anymore:
>
> kiwi-ng ... system boxbuild ... --virtiofs-sharing -- ...
>
>
> The first issue (on a Debian 12 host) was
>
> --- snip ---
> KiwiBoxPluginVirtioFsError: virtiofsd not found in: ['/usr/lib/virtiofsd',
> '/usr/libexec']'
> --- snip ---
>
> which I could work around with
>
> ln -s /usr/lib/qemu/virtiofsd /usr/libexec/virtiofsd

I will add '/usr/lib/qemu/virtiofsd' as search path

> But after that I run into "Failed to connect to '/tmp/vhostqemu_0'":

That I believe depends on the virtiofsd version you are using.
I have it running right now and see:

(main|✚ 1)➤ ps ax | grep virtiofsd
11006 pts/1 S+ 0:00 /usr/lib/virtiofsd/virtiofsd --socket-path=/tmp/vhostqemu_0 --shared-dir /home/ms/Project/kiwi-descriptions/suse/x86_64/suse-leap-15.6 --sandbox namespace --cache always --allow-direct-io --posix-acl --xattr
11007 pts/1 S+ 0:00 /usr/lib/virtiofsd/virtiofsd --socket-path=/tmp/vhostqemu_1 --shared-dir /tmp/mytest --sandbox namespace --cache always --allow-direct-io --posix-acl --xattr
11015 pts/1 Sl+ 0:00 /usr/lib/virtiofsd/virtiofsd --socket-path=/tmp/vhostqemu_0 --shared-dir /home/ms/Project/kiwi-descriptions/suse/x86_64/suse-leap-15.6 --sandbox namespace --cache always --allow-direct-io --posix-acl --xattr
11016 pts/1 Sl+ 0:00 /usr/lib/virtiofsd/virtiofsd --socket-path=/tmp/vhostqemu_1 --shared-dir /tmp/mytest --sandbox namespace --cache always --allow-direct-io --posix-acl --xattr
13237 pts/7 S+ 0:00 grep --color=auto virtiofsd

I'm using virtiofsd-1.10.1-Virt.150500.25.5.x86_64

Anything older might not work and you also need to check for your
security policies active on the system. selinux can be a problem
in this regard.

I'm using virtiofsd regularly but only on Leap so far.

Let me know what you find. I also found another small bug related
to a change on the Path.which side in the kiwi code. I will open
a PR to fix that one too

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
signature.asc

Till Dörges

unread,
Dec 10, 2024, 8:33:36 AM12/10/24
to kiwi-...@googlegroups.com
On 10.12.24 13:32, Marcus Schäfer wrote:

>> which I could work around with
>>
>> ln -s /usr/lib/qemu/virtiofsd /usr/libexec/virtiofsd
>
> I will add '/usr/lib/qemu/virtiofsd' as search path

Might not be necessary (see below).

IIUC only the old and deprecated virtiofsd lives in /usr/lib/qemu/.


>> But after that I run into "Failed to connect to '/tmp/vhostqemu_0'":
>
> That I believe depends on the virtiofsd version you are using.
> I have it running right now and see:
[...]
> I'm using virtiofsd-1.10.1-Virt.150500.25.5.x86_64

--- snip ---
# /usr/lib/qemu/virtiofsd -V

virtiofsd version 7.2.13 (Debian 1:7.2+dfsg-7+deb12u7)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
using FUSE kernel interface version 7.36
--- snap ---

But 7.2 actually is just the QEMU version number and that particular daemon is
written in C.

I'm guessing I actually need the new one daemon written in Rust, which is not
available on Debian 12, but in testing only
(https://packages.debian.org/de/trixie/virtiofsd).
Reply all
Reply to author
Forward
0 new messages