Problems With Qemu Img Disks Allocated In A Nfs Share

Home » CentOS-Virt » Problems With Qemu Img Disks Allocated In A Nfs Share
CentOS-Virt 2 Comments

Hi all,

I have a strange problem with qemu img disks allocated in a nfs share on a CentOS 6.4 host. Every time when I try to start a vm this error appears:

char device redirected to /dev/pts/1
qemu-kvm: -drive file=/data/vmachines/win2k12adsrv/win2k12vol01.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none:
could not open disk image /data/vmachines/win2k12adsrv/win2k12vol01.img:
Permission denied

Obviously, qemu disk exists:

[root@c64kvm qemu]# ls -la /data/vmachines/win2k12adsrv/win2k12vol01.img
-rw-r–r– 1 root root 262144 Mar 16 16:11
/data/vmachines/win2k12adsrv/win2k12vol01.img

If I change this qemu disk stored in a nfs share by another stored on local disk, all works ok.

Mount permissions in this kvm host:

sansrv:/ on /exports type nfs4
(rw,rsize2768,wsize2768,hard,intr,addr2.25.60.1,clientaddr2.25.60.2)

and selinux is disabled … Any idea??

2 thoughts on - Problems With Qemu Img Disks Allocated In A Nfs Share

  • Ok, problem fixed. I’ve edited the “/etc/libvirt/qemu.conf” file and add the lines:

    user = “root”
    group = “root”

    default is to execute as a qemu user …

LEAVE A COMMENT