Unable to mount cephfs volume as a device into VM

I’m trying to use cephfs volume as shared storage between containers and VM in the Incus cluster. I use disk device in the shared profile like below:

devices:
  test:
    path: /test
    pool: test_shared_vols
    source: a-test
    type: disk

Containers accept and mount this device. However, VM does not mount it inside, but only creates the mount folder (/test in this case).
Unfortunately, official documentation does not explain such case. Do Incus VMs support mounting filesystem volume(s)?

What Incus version are you running?

It may be worth looking at the systemd journal and dmesg log in the VM.
The mountpoint existing but the volume not being mounted on it sounds a lot like the VM or host may have broken/missing virtiofsd support.

You are right.
Here is a error in the incus log: level=warning msg="Unable to use virtio-fs for device, using 9p as a fallback" device=test driver=disk err="Architecture unsupported" instance=a-test-vm project=test
Looks like Ubuntu 24.04 LTS kernel for Raspberry Pi was not compiled with corresponded flag:

$ grep -i virtio /boot/config-$(uname -r)
CONFIG_BLK_MQ_VIRTIO=y
CONFIG_VIRTIO_VSOCKETS=m
CONFIG_VIRTIO_VSOCKETS_COMMON=m
CONFIG_BT_VIRTIO=m
CONFIG_NET_9P_VIRTIO=m
CONFIG_VIRTIO_BLK=m
CONFIG_SCSI_VIRTIO=m
CONFIG_VIRTIO_NET=m
CONFIG_CAIF_VIRTIO=m
CONFIG_VIRTIO_CONSOLE=m
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_I2C_VIRTIO=m
CONFIG_GPIO_VIRTIO=m
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_DRM_VIRTIO_GPU_KMS=y
CONFIG_SND_VIRTIO=m
CONFIG_VIRTIO_ANCHOR=y
CONFIG_VIRTIO=m
CONFIG_VIRTIO_PCI_LIB=m
CONFIG_VIRTIO_PCI_LIB_LEGACY=m
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_VDPA=m
# CONFIG_VIRTIO_PMEM is not set
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_INPUT=m
CONFIG_VIRTIO_MMIO=m
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
CONFIG_VIRTIO_DMA_SHARED_BUFFER=m
CONFIG_VIRTIO_IOMMU=m
CONFIG_RPMSG_VIRTIO=m
# CONFIG_VIRTIO_FS is not set
CONFIG_CRYPTO_DEV_VIRTIO=m

I’m reasonably sure that the check in there pre-dates virtiofsd being rewritten in Rust.
I think it’s therefore fine to drop the check which should then fix this for you.

1 Like