[libvirt-users] Live blockcopy onto storage pool that is an NFS mount?

Hello, I am running qemu-kvm 1.4.0 and libvirt 1.0.2 on Ubuntu 12.04. I have two NFS mountpoints configured as two separate pools in virsh: <pool type='dir'> <name>nfs1</name> <uuid>419d799c-2493-6ebc-6848-53b0919e7bad</uuid> <capacity unit='bytes'>6836057014272</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>6836057014272</available> <source> </source> <target> <path>/var/lib/libvirt/images/nfs1</path> <permissions> <mode>0711</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> The XML for the nfs2 pool is similar, with the mountpoint being /var/lib/libvirt/images/nfs2. I would like to be able to move the VM disk from one of the NFS mountpoints to another (nfs1 --> nfs2) live. I followed the instructions here: http://thr3ads.net/libvirt-users/2013/02/2174486-Migrate-VMs-to-different-st... However when I attempt the blockcopy command, I receive this error: Failed to create file '/var/lib/libvirt/images/nfs2/vm.qcow2': Operation not permitted Is it not possible to blockcopy in this way to an NFS mount? Thanks, Andrew

On 08/01/2014 03:29 PM, Andrew Martin wrote:
Hello,
I am running qemu-kvm 1.4.0 and libvirt 1.0.2 on Ubuntu 12.04. I have two NFS mountpoints configured as two separate pools in virsh:
I would like to be able to move the VM disk from one of the NFS mountpoints to another (nfs1 --> nfs2) live. I followed the instructions here: http://thr3ads.net/libvirt-users/2013/02/2174486-Migrate-VMs-to-different-st...
More than a year old, but they should still work.
However when I attempt the blockcopy command, I receive this error: Failed to create file '/var/lib/libvirt/images/nfs2/vm.qcow2': Operation not permitted
Hmm, I know we've had problems in the past about labeling NFS files correctly, particularly when root squash is in play. Do you have root squash turned on in your NFS servers? If so, can you turn it off, and see if that improves the situation? Also, libvirt 1.0.2 is a bit old; you may be encountering a bug that has been fixed in the meantime. Would you mind retrying with 1.2.7-rc2, to see if we need a last-minute bug-fix before this weekend's release of 1.2.7? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

----- Original Message -----
From: "Eric Blake" <eblake@redhat.com> To: "Andrew Martin" <amartin@xes-inc.com>, libvirt-users@redhat.com Sent: Friday, August 1, 2014 4:40:28 PM Subject: Re: [libvirt-users] Live blockcopy onto storage pool that is an NFS mount?
However when I attempt the blockcopy command, I receive this error: Failed to create file '/var/lib/libvirt/images/nfs2/vm.qcow2': Operation not permitted
Hmm, I know we've had problems in the past about labeling NFS files correctly, particularly when root squash is in play. Do you have root squash turned on in your NFS servers? If so, can you turn it off, and see if that improves the situation? Also, libvirt 1.0.2 is a bit old; you may be encountering a bug that has been fixed in the meantime. Would you mind retrying with 1.2.7-rc2, to see if we need a last-minute bug-fix before this weekend's release of 1.2.7?
-- Eric,
Thanks for the help. Mounting the NFS exports with no_root_squash solved the problem! In fact, I was able to successfully blockpull from one NFS mountpoint to another with only these steps (without making it transient): virsh snapshot-create-as --domain <vm_name> --disk-only --atomic --no-metadata --diskspec vda,snapshot=external,file=/path/to/nfs1/<vm_name>.qcow2 virsh blockpull --domain <vm_name> --path /path/to/nfs2/<vm_name>.qcow2 Since this works in libvirt 1.0.2 I imagine it will work just as well in libvirt 1.2.7 as well. Thanks, Andrew
participants (2)
-
Andrew Martin
-
Eric Blake