Hi, I am trying to import qcow2 images into AWS. 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 I followed the steps below and encountered a *ClientError: No valid partitions. Not a valid volume *issue #qemu-img convert kvmservertoaws.qcow2 kvmservertoaws.raw aws ec2 import-image --disk-containers Format=raw,UserBucket="{S3Bucket=dacofficelabserversimage,S3Key=kvmservertoaws.raw}" { "ImportTaskId": "import-ami-0da503c0a22adbb0f", "Progress": "1", "SnapshotDetails": [ { "DiskImageSize": 0.0, "Format": "RAW", "UserBucket": { "S3Bucket": "dacofficelabserversimage", "S3Key": "kvmservertoaws.raw" } } ], "Status": "active", "StatusMessage": "*pending*" } #aws ec2 describe-import-image-tasks --import-task-ids import-ami-0da503c0a22adbb0f { "ImportImageTasks": [ { "ImportTaskId": "import-ami-0da503c0a22adbb0f", "Progress": "19", "SnapshotDetails": [ { "DiskImageSize": 21478375424.0, "Format": "RAW", "Status": "active", "UserBucket": { "S3Bucket": "dacofficelabserversimage", "S3Key": "kvmservertoaws.raw" } } ], "Status": "active", "StatusMessage": "*converting*", "Tags": [] } ] } # aws ec2 describe-import-image-tasks --import-task-ids import-ami-0da503c0a22adbb0f { "ImportImageTasks": [ { "ImportTaskId": "import-ami-0da503c0a22adbb0f", "Progress": "27", "SnapshotDetails": [ { "DeviceName": "/dev/sde", "DiskImageSize": 21478375424.0, "Format": "RAW", "Status": "completed", "UserBucket": { "S3Bucket": "dacofficelabserversimage", "S3Key": "kvmservertoaws.raw" } } ], "Status": "active", "StatusMessage": "*updating*", "Tags": [] } ] } # aws ec2 describe-import-image-tasks --import-task-ids import-ami-0da503c0a22adbb0f { "ImportImageTasks": [ { "ImportTaskId": "import-ami-0da503c0a22adbb0f", "SnapshotDetails": [ { "DeviceName": "/dev/sde", "DiskImageSize": 21478375424.0, "Format": "RAW", "Status": "completed", "UserBucket": { "S3Bucket": "dacofficelabserversimage", "S3Key": "kvmservertoaws.raw" } } ], "Status": "deleted", "StatusMessage": "*ClientError: No valid partitions. Not a valid volume."*, "Tags": [] } ] } Am I missing anything? Any help will be highly appreciated. I look forward to hearing from you. Please guide me. Thanks in Advance. Best Regards, Kaushal On Mon, Sep 19, 2022 at 10:07 PM Kaushal Shriyan <kaushalshri...@gmail.com> wrote: > Hi, > > Is there a way to backup KVM Guest VM in openapibox.img or openapibox.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 > > 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 > > # 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 > > *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]", > "Tags": [] > } > ] > } > > Am I missing anything? Any help will be highly appreciated. I look forward > to hearing from you. Please guide me. Thanks in Advance. > > Best Regards, > > Kaushal > >