Anyone else having issues with VirtioFS and extended attributes?

Clancy

New Member
Oct 14, 2024
4
0
1
I'm attempting to set up some virtiofs shares to VMs that require extented attributes, but can't get it working. On the host I've enabled the extended attributes flag, but when I mount the share in the guest attempting something even as simple as lsattr gives "Operation not supported". I've tested this with both Fedora (CoreOS) and Ubuntu Server, and it happens regardless of what the underlying filesystem is (tested both ZFS datasets and ext4). lsattr works perfectly in the same directory when executed from the host. There's no helpful log output, virtiofs just reports coming online and attaching successfully.

Has anyone else been able to get extended attributes to work for virtiofs?
 
xattr/security labels support needs special virtiofs(d) support - probably the same problem as mentioned here? https://forum.proxmox.com/threads/proxmox-ve-8-4-released.164821/post-775278
I had also been trying to get security labels to work (didn't want to turn the main release thread into just this) but this was just standard xattr using the built in flag Proxmox already exposes. For reasons unclear to me though, presumably involving a reboot, xattrs are now working

(side note should have been using getfattr and setfattr rather than lsattr, got that from an incorrect set of instructions. getfattr and setfattr hadn't worked either before it mysteriously fixed itself though)
 
I have just switched one of my VMs to use virtiofs shares the new way, but for even just an ls command executed in the VM for the shared directory, I just get the "Operation not supported" error. Previously I had custom args in the VM config and a hookscript that started virtiofsd before the VM started, and it was working for a long time.

Interestingly, `df -h` can print storage usage info for the virtiofs shares, but their "Size" and "Used" values are incorrect. Size is slightly larger than "Free" for both of them. This was also working fine with the old setup.
 
If I disable POSIX ACLs for a virtiofs share of a VM, and shutdown and boot that VM, the shared directory will be accessible.
But it seems that if I only enable xattr support of these two, then "ls" works on the shared directory.

I wonder if this could be a permission issue, but it was working for a long time.
 
I'm attempting to set up some virtiofs shares to VMs that require extented attributes, but can't get it working. On the host I've enabled the extended attributes flag, but when I mount the share in the guest attempting something even as simple as lsattr gives "Operation not supported". I've tested this with both Fedora (CoreOS) and Ubuntu Server, and it happens regardless of what the underlying filesystem is (tested both ZFS datasets and ext4). lsattr works perfectly in the same directory when executed from the host. There's no helpful log output, virtiofs just reports coming online and attaching successfully.

Has anyone else been able to get extended attributes to work for virtiofs?

I was encountering a similar issue on a ZFS volume passed through as a directory mapping via virtiofs.

The passthrough was enabled with xattr support, POSIX ACLs and Direct IO, but was failing with Operation not supported on any operations once mounted in the VM.

Updating the ZFS pool configuration to support POSIX ACLs resolved the failures:

zfs set acltype=posixacl [<em>pool</em>]

Following this everything was working as expected.