Jing-Wei Su
2021-Apr-09 17:05 UTC
live migrate storage to different volume on the same host
Hello experts, I would like to move the qcow2 disk images of a running VM to a different storage because of the maintenance of the underlying storage on the same host. I found the live migration is not allowable on the same host using virsh. Is there any suggestion or better practices for this? Thank you, Derek
Peter Krempa
2021-Apr-12 06:32 UTC
live migrate storage to different volume on the same host
On Sat, Apr 10, 2021 at 01:05:31 +0800, Jing-Wei Su wrote:> Hello experts, > > I would like to move the qcow2 disk images of a running VM to a > different storage because of the maintenance of the underlying storage > on the same host.You can use the 'virDomainBlockCopy' API to achieve this. To use it via virsh, the simplest way would be to: virsh blockcopy $VMNAME $DISKTARGET --dest /path/to/destination --transient-job --pivot (--verbose) ($DISKTARGET is 'vda' for example) In case you need a more complicated description of the target of the copy such as a network storage target you can also use the --xml option to use a XML description of the target.> I found the live migration is not allowable on the same host using > virsh. Is there any suggestion or better practices for this?Full migration would also try to move the qemu process which is not required in your case.