Skip to content

Proxmox to AWS (for Disaster Recovery - DR purpose) importing with AWS's Migration Hub Orchestrator (MHO)

0

Setup / Environment:

o- Proxmox VE 8.3 o- VM on Proxmox running Oracle Linux o- VM on Proxmox running Windows Server 2022 o- VMs are in .qcow2 format on proxmox (just want to make sure!)

Purpose:

o- Convert the .qcow2 file to a format compatible with AWS's Migration Hub Orchestrator (MHO). o- MHO supports the following formats: OVA, RAW, VHD, VHDX, and VMDK and perhaps some others. o- I converted my myvm.qcow2 to a) myvm.vmdk b) myvm.raw c) myvm.vhdx formats (since qemu-img supports .vmdk, .raw, and .vhdx; which are MHO's supported format). o- However, when importing any of these (myvm.vmdk, myvm.raw, myvm.vhdx), none of them worked and error out. o- Importing errors are like:

o- <snip> Disk Validation failed <snip> for vhdx format when imprting image with MHO; error image attached o- <snip> Unknown OS / Missing OS files <snip> for both vmdk and raw imprting images with MHO; error image attached

Attempts & Challenges:

Open Virtualization Format (OVF) Tool:

o- Some forum posts here suggest using the OVF Tool. However, this requires building a template OVF (template.ovf) based on the VM's hardware specs. The OVF Tool is available for Linux, Windows, and macOS, and while I prefer to install it on Proxmox, I still need a valid myvm.ovf (or simply call template.ovf) to proceed.

Using TAR Command to Create OVA:

o- I attempted to use the tar command (tar -cvf myvm.ova myvm.ovf myvm.vmdk) to create an OVA. I created a myvm.ovf template, but when importing the resulting myvm.ova into Oracle VirtualBox, it threw several errors. After three attempts on a POC for myvm.ova, I was unable to get this method to work when trying to to fix myvm.ovf.

The Goal:

The goal remains to successfully convert myvm.qcow2 into a format that can be used by AWS Migration Hub Orchestrator. I am looking a way, for example take any of the running myvm's configuration file from proxmox (i,e, /etc/pve/qemu-server/myvm.conf or anything like that) and make a ovf (myvm.ovf in this case) file. So that I can tar command (tar -cvf myvm.ova myvm.ovf myvm.vmdk) to gnerate myvm.ova which has no issue importing into AWS's MHO tool. Because of the real vm's size, hard to bring onto a PC to import into first in Oracle VirtualBox as vmdk format and then export as myvm.ova.

Note: All of my transferred files have been verified using md5sum to ensure file integrity and prevent any data corruption.

Has anyone exported VMs from Proxmox and imported them into AWS using the Migration Hub Orchestrator (MHO) interface successfully? If so, I would greatly appreciate your guidance. Thank you for taking the time to read through this long thread, and I appreciate any help you can provide.

asked 2 years ago558 views

2 Answers
0

While I understand your goal of importing VMs from Proxmox to AWS using Migration Hub Orchestrator (MHO), there are a few challenges and considerations to address based on the information provided.

First, it's important to note that VM Import/Export supports specific image formats for importing disks and VMs. These include Open Virtual Appliance (OVA), Stream-optimized ESX Virtual Machine Disk (VMDK), Fixed and Dynamic Virtual Hard Disk (VHD/VHDX), and raw format. The .qcow2 format used in Proxmox is not directly supported.

Your approach of converting the .qcow2 files to supported formats like .vmdk, .raw, and .vhdx is a good start. However, the errors you're encountering suggest that there might be issues with the conversion process or the resulting files.

For the "Disk Validation failed" error with the .vhdx format, this could indicate that the converted file doesn't meet the specific requirements for VM Import/Export. The "Unknown OS / Missing OS files" error for .vmdk and .raw formats suggests that the conversion process might not be preserving the necessary operating system files or metadata.

Creating an OVA file is a good approach, as it's one of the supported formats. However, creating a valid OVF descriptor file can be challenging without the proper tools or expertise.

Here are some suggestions to help you move forward:

  1. Ensure that your converted files (.vmdk, .raw, .vhdx) are compatible with the specific requirements of VM Import/Export. This includes checking that the file system formats are supported (ext2, ext3, ext4, Btrfs, JFS, or XFS for Linux; NTFS for Windows).

  2. When converting, try using the stream-optimized VMDK format specifically, as it's mentioned as compatible with VM Import/Export.

  3. For creating an OVA, consider using a tool like virt-v2v, which can convert Proxmox VMs to OVA format. This might help in creating a more compatible OVA file.

  4. If possible, try using the AWS CLI to import your VM instead of the MHO interface. This might provide more detailed error messages that could help in troubleshooting.

  5. Verify that your VMs meet all the requirements for VM Import/Export, including supported operating systems, boot modes, and volume types.

  6. If you're using KMS encryption for your S3 bucket where the VM files are stored, ensure that the vmimport role has the necessary permissions to decrypt the files.

Unfortunately, I don't have specific experience with exporting VMs from Proxmox and importing them into AWS using MHO. However, these suggestions should help you troubleshoot and potentially resolve the issues you're facing. If problems persist, you may need to reach out to AWS support for more specific guidance tailored to your exact setup and VM configurations.
Sources
Importing a VM as an image - VM Import/Export
Requirements for resources that you import with VM Import/Export - VM Import/Export
VM Import/Export
"Unsupported specified file format" when importing VM as an image from S3 | AWS re:Post
Fehlermedung 'ClientError: Disk validation failed [Failed to read bytes of data from input]' bei dem Versuch ein OVA als Image zu importieren | AWS re:Post

answered 2 years ago

0

Looks like your end goal is to import VMs to AWS. As for all the methods that you have tried so far for converting the ".qcow2" backup images to a supported format like ".vmdk" or ".raw", I believe the conversion process is what's resulting in the final image not meeting the pre-requisites for launching the VM on AWS.

Could you instead check if importing as a ".vmo.lzo" backup file works. Referencing below steps that you can follow:

  1. Generate a ".vmo.lzo" backup image for your VM on Proxmox.
  2. Extract the uncompressed vma file from the vmz.lzo backup file (Promox backup). $ lzop -d vzdump-qemu-xyz.xyz.vma.lzo
  3. Extract the raw VM image from the vma file to a directory called "raw-image". $ vma extract -v vzdump-qemu-xyz.xyz.vma ./raw-image
  4. You can then upload the raw VM image straight to S3 and import it.

You can further use qemu-img to convert to .vmdk if needed (Make sure it is stream optimized as the below command): $ qemu-img convert -O vmdk -o subformat=streamOptimized xyz.raw xyz.raw.vmdk

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.