we are trying to create a new setup with a centralized storage server. Currently we are running multiple „All-in-One“ hosts using raw volumes stored on the local disk of the server.
I tried it first with samba but it did not work so currently I have configured it as NFS.
This is my current setup:
OS: Ubuntu 16.04 beta (to match vHost version),
OS: Ubuntu 16.04 beta (as the Package in Ubuntu 14.04 has still a bug that prevents mounting of samba shares)
Both are simply connected via switched network for testing.
So on the Storage server I created a user and a group called vstorage (uid:1000,gid:500)
Then created a folder /pool owned by this user, permission 777
And exported it via nfs in /etc/exports:
On the vHost I defined the pool via XML:
When I try to define a volume in the pool, it will always fail if raw format (default) is used.
virsh vol-create-as --pool pool --name test --capacity 512M
error: Failed to create vol test
error: Failed to create file '/var/lib/virt/images/test': Operation not permitted
In /var/log/syslog I can find the following
libvirtd: cannot chown '/var/lib/virt/images/test' to (0, 0): Operation not permitted
libvirtd: Failed to create file '/var/lib/virt/images/test': Operation not permitted
When I try it with a different format, like qcow2 it is working fine:
virsh vol-create-as --pool pool --name test --capacity 512M --format qcow2
Vol test created
I am unable to find the reason for this problem, it also took me quite a while find out that this is a format issue as the error message is actually not really helpful.
I found a small guide on setting up KVM from IBM and they are using NFS with raw images, so I’m not sure where the error is
Maybe someone could shed some light on this? The same error message happens btw. with Samba.