[libvirt-users] Unable to create raw volume on netfs storage (Operation not permitted)

Benjamin Weik Benjamin.Weik at core-backbone.com
Wed Feb 10 13:10:33 UTC 2016


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:

For Storage:
OS: Ubuntu 16.04 beta (to match vHost version),
NFS: v1.2.8
Samba: v4.3.3

For vHost:
OS: Ubuntu 16.04 beta (as the Package in Ubuntu 14.04 has still a bug that prevents mounting of samba shares)
Libvirt: v2.21
Qemu: 2.5

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:

<pool type='netfs'>
    <host name=''/>
    <dir path='pool'/>
    <format type='nfs'/>

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[889]: cannot chown '/var/lib/virt/images/test' to (0, 0): Operation not permitted
libvirtd[889]: 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.

Best regards,

Benjamin Weik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160210/55011498/attachment.htm>

More information about the libvirt-users mailing list