1

I am trying to migrate a VM from one host to another with below command

 virsh migrate --live nodetwo qemu+ssh://192.168.1.33/system

nodetwo = VM name

But I am getting an error as

error: internal error: process exited while connecting to monitor: 2015-10-25T04:37:24.489443Z qemu-kvm: -drive file=/home/nodetwo/nodetwo.qcow2,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /home/nodetwo/nodetwo.qcow2: Could not open file: Permission denied

/home/nodetwo/nodetwo.qcow2 file has 777 permission. /etc/libvirt/qemu.conf file has user = root & group = root

Still not sure why I am getting above error. Directory /home/nodetwo contains the image file on source host and it is mounted on target host using NFS. (Source host = host that contains the guest and target host = host on which I want to migrate the guest)

Please help.

  • Do you have no_root_squash in your NFS export? If not, then the NFS server will treat root as user nobody. You should probably be running libvirt, qemu, etc as libvirt-qemu (or similar, depending on your distro) rather than as root, anyway. – cas Oct 25 '15 at 6:29
  • It didn't work. In NFS exports I have given (rw) access to other nodes (*) so even if its other user (libvirt-qemu) it should not have given error 'permission denied'. – karan ratnaparkhi Oct 25 '15 at 18:46
  • You didn't answer my question - do you have no_root_squash in your NFS export? If not, then the NFS server will treat root as user nobody. This means that as well as read-write access to the file /home/nodetwo/nodetwo.qcow2, nobody also needs read and execute access to /home and /home/nodetwo. BTW, setting perms to 777 or 666 in order to "solve" permissions problems is never a good idea. – cas Oct 25 '15 at 19:26
  • @cas I added no_root_squash to NFS exports, /home/nodetwo *(rw,no_root_squash,async) but still the error persists – karan ratnaparkhi Oct 26 '15 at 2:20
  • did you reload the nfs server after changing /etc/exports? – cas Oct 26 '15 at 2:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.