Re: Backup KVM Guest VM in OVA or VMDK format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 19, 2022 at 09:13:37PM +0530, Kaushal Shriyan wrote:
On Wed, Sep 14, 2022 at 7:38 PM Kaushal Shriyan <kaushalshriyan@xxxxxxxxx>
wrote:



On Sat, Sep 3, 2022 at 12:28 AM Kaushal Shriyan <kaushalshriyan@xxxxxxxxx>
wrote:



On Thu, Sep 1, 2022 at 9:39 PM Kaushal Shriyan <kaushalshriyan@xxxxxxxxx>
wrote:

Hi,

Is there a way to backup KVM Guest VM 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


Well, raw image is the most versatile, but the other formats (especially
1 and 2) might have also other metadata like the number of cpus, memory
size, devices etc.

Also any method to take full and incremental backup of KVM Guest VM.


I am not experienced with backups, but my guess is you can either create
your own workflow using various blockjobs or you might want to check out
backup-* and checkpoint-* commands.

Any help will be highly appreciated. I look forward to hearing from you.
Thanks in Advance.

Best Regards,

Kaushal



Hi,

Checking in again if someone can pitch in for my earlier post to this
mailing list. Thanks in advance.

Best Regards,

Kaushal


Hi,

I followed the below steps by referring to
https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html
.

# qemu-img -h | grep Supported
Supported formats: blkdebug blklogwrites blkverify compress
copy-before-write copy-on-read file ftp ftps gluster host_cdrom host_device
http https iscsi iser luks nbd null-aio null-co nvme preallocate qcow2
quorum raw rbd ssh throttle vhdx vmdk vpc


This might be a bit misleading since VMDK may meat a lot of things, it's
not one format, it can store different things, and the support may mean
different things.

# qemu-img --version
qemu-img version 6.2.0 (qemu-kvm-6.2.0-12.module_el8.7.0+1140+ff0772f9)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
#

*Step No. 1*
#qemu-img convert -O vmdk openapibox.img openapibox.vmdk -p


I see you are also just using QEMU, is this anyway libvirt-related or
are you just using qemu command line?

Since you are not adding any metadata, then why not just use the raw
image since I presume openapibox.img is in raw and not qcow format.  If
it is qcow, then you can convert it to raw and use that.  The
disadvantage of the raw format is also the fact that most tools will not
keep the sparseness, so you might end up with a high storage usage.
Maybe you can try vhdx instead since that *should* just be a disk image.

*Step No. 2*
#aws ec2 import-image --disk-containers
Format=vmdk,UserBucket="{S3Bucket=daclabservers,S3Key=openapidbox.vmdk}"
{
    "ImportTaskId": "import-ami-0232f452194f6efe0",
    "Progress": "1",
    "SnapshotDetails": [
        {
            "DiskImageSize": 0.0,
            "Format": "VMDK",
            "UserBucket": {
                "S3Bucket": "daclabservers",
                "S3Key": "openapibox.vmdk"
            }
        }
    ],
    "Status": "active",
    "StatusMessage": "pending"
}

*Step No. 3*
#aws ec2 describe-import-image-tasks --import-task-ids
import-ami-0232f452194f6efe0
{
    "ImportImageTasks": [
        {
            "ImportTaskId": "import-ami-0232f452194f6efe0",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 0.0,
                    "Status": "completed"
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: Disk validation failed
[Unsupported VMDK File Format]",

As you see here VMDK itself has various formats.

            "Tags": []
        }
    ]
}

Please guide me. Am I missing anything? Thanks in advance.

Best Regards,

Kaushal


Hi,

I will appreciate it if someone can pitch in for my earlier post to this
mailing list and need guidance in this regard. I look forward to hearing
from you. Thanks in advance.

Best Regards,

Kaushal

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux