bhyve bhyve/virtio-9p - symlinks are broken on guest side

  • Host: FreeBSD 14.3-RELEASE-p5
  • Guest: Alpine Linux 3.22.2
I've set up a bhyve VM on my system as above, and added some virtio-9p devices to share various host files, for example (vm-bhyve):
Code:
disk3_type="virtio-9p"
disk3_dev="custom"
disk3_name="storage=/mnt"

On the guest, I use the following fstab entry:
Code:
storage /mnt 9p trans=virtio,version=9p2000.u 0 0

This mounts fine and appears to work, however I've quickly found that on the guest side, symlinks just don't work at all:
Code:
$ touch whatever
$ ln -s whatever link-to-whatever
$ ls -l link-to-whatever
lrwxr-xr-x    1 <snip>         8 Nov 27 00:33 link-to-whatever ->
$ readlink link-to-whatever

$

Existing symlinks created on the host side also behave the same way.

Is there anything I can do to make symlinks work for 9p shares or will I have to resort to NFS?
 
I am not sure what exactly 9p2000.u supports but use version=9p2000.L as that definitely works.
That did the trick, thanks! Must be something new, because the stuff I read about setting up virtio-9p refers to 9p2000.u.

Now symlinks work fine, but trying to make a fifo on a 9p mount gives "Operation not permitted":
Code:
# strace mkfifo test
[...]
mknod("test", S_IFIFO|0666)             = -1 EPERM (Operation not permitted)

However, if I create a fifo on the host it works as expected on the guest. Is there anything more I can do or will I have to work around this? Not too much of a big deal, but it would be nice to have this working.

(My intended use-case is to run Docker on the guest with /var/lib/docker stored on a ZFS dataset on the host)
 
Back
Top