[CentOS] Backup KVM Guest VM in OVA or VMDK format

Fri Sep 2 12:11:36 UTC 2022
Fabian Arrotin <arrfab at centos.org>

On 01/09/2022 18:14, Kaushal Shriyan wrote:
> Hi,
> Is there a way to backup KVM Guest VM running CentOS Linux release 7.9.2009
> (Core) OS in kvmguestosimage.ova or kvmguestosimage.vmdk format as I am
> trying to restore it in AWS by referring to
> https://aws.amazon.com/ec2/vm-import/ article as per the below supported
> file format.
> [1] Open Virtualization Archive (OVA)
> [2] Virtual Machine Disk (VMDK)
> [3] Virtual Hard Disk (VHD/VHDX)
> [4] raw
> Also any method to take full and incremental backup of KVM Guest VM.
> Any help will be highly appreciated. I look forward to hearing from you.
> Thanks in Advance.
> Best Regards,
> Kaushal

Stop the vm
qemu-img convert -f raw origin.qcow2 dest.raw

You can then import but while we use this to create official centos 
image, don't forget to ensure that you node is ready to be imported, so 
cloud-init, etc, etc

It's usually easier/better/faster to have automation in place to 
configure an application and so replay it on a new node, and then 
replicate data

I guess only option why you'd want to not do this is that it's a running 
machine that was configured "by hands" by someone who left the company 
(and so without automation in place)

Fabian Arrotin
The CentOS Project | https://www.centos.org
gpg key: 17F3B7A1 | twitter: @arrfab
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20220902/3e77130b/attachment-0002.sig>