KVM + Samba (+ ZFS), cannot create new VM storage files (Permission problem)

Hey everyone, I have run into a bit of a pickle.

I have a Centos8 with ZoL 0.8.2 pool exposed through samba to an Arch Linux host. Mounted through fstab as root.

I am running libvirtd as root on Arch. I am trying to create VM images through libvirtd on the Samba share on Arch but I am getting permission errors.

Anyone care to help, please?!

Just curious why samba since you have two Linux systems?

Because I also have Windows systems accessing the same shares.

I eventually want to move to iSCSI for such workloads but for now I am looking to make it work through Samba.

1 Like

can you write to the share from the arch system at all?

Yes. I have full control from the CLI.

Something gets messed through either libvirtd, qemu or kvm.

I am running looking glass so I have to run libvirtd as root but I believe qemu is running as my regular user.

I am not really sure how to find out where the problem in the chain is.

Since libvirtd is running as root, I would expect it to be able to modify and write files to the “root” share. But the share does not get mounted as 770 as I expect it to, no matter what I change.

The share is mounted as: drwxr-xr-x root root. TL;DR, the share seems to get mounted under the correct user permissions but not the correct group permissions. Since libvirtd is running as root, I would expect that it uses those user permissions as I would do throught the CLI (where I am definitely able to write and delete files and directories) but it seems as if because the rw group permission is not honored, libvirtd cannot create or modify files.

maybe libvirt doesnt run as root?

The shortcut itself under Permissions shows:
User: root
Group: root