Hi,
I do have 2 VMs running on CentOS 7 KVM environment.
I want to make either clone of VMs or copy of VMs as a backup.
Following is my scenario and advices on how to do that would be highly appreciated.
1.) VM-1 have only single qcow2 image deployed. qcow2 was originally 50GB and I deployed it as 1000GB using qcow2 expand. Currently this disk only have 65GB. If I copy this file using cp command and dump xml file would that suffice ? Or if I clone this VM using virt-clone how much size will it take? 1000GB or 65GB ?
2.) VM-2 have 2 qcow2 disks in the VM. How can I make copy of this VM.
Thanks in advance.
GPMPA
Making Copy of KVM VM
Re: Making Copy of KVM VM
I'm copying a sparse qcow2 VM image that is 500 GB in size, but has 60 GB of allocated blocks.
I copy this VM image using cp command and size is 60 GB.
I copy this VM image using cp command and size is 60 GB.
Re: Making Copy of KVM VM
Hi Poky,
Thanks for the response.
Does that mean I can just copy qcow2 image using cp command to backup VM ? Here I will need to cp xml file as well.
Or else should I use virt-clone to copy(backup) VM? What is the difference?
I will expect to run the VM later on incase of any requirement.
Thanks
Pamuditha
Thanks for the response.
Does that mean I can just copy qcow2 image using cp command to backup VM ? Here I will need to cp xml file as well.
Or else should I use virt-clone to copy(backup) VM? What is the difference?
I will expect to run the VM later on incase of any requirement.
Thanks
Pamuditha
-
- Posts: 96
- Joined: 2011/11/21 10:19:41
Re: Making Copy of KVM VM
Hi gpma,
if the VM ist stopped (not running) using cp is a simple way. BUT to make a copy of the xml file. it's better to use, because if you change the KVM-Environment or the Domain - you need a DUMP-File!
Thomas
if the VM ist stopped (not running) using cp is a simple way. BUT to make a copy of the xml file. it's better to use
Code: Select all
virsh-dumpxml [VMName] > [VMName].xml
Thomas
Re: Making Copy of KVM VM
Hi Thomas,
Thanks for the response.
Either virt-clone or cp will only take time to copy actual volume of the VM. right? I mean I have 1000GB allocated and only 110GB is used of VM now. either cp or virt-clone will take time only to copy 110GB right?
Thanks
gpmpa
Thanks for the response.
Either virt-clone or cp will only take time to copy actual volume of the VM. right? I mean I have 1000GB allocated and only 110GB is used of VM now. either cp or virt-clone will take time only to copy 110GB right?
Thanks
gpmpa