问题
Although vmdk disk format is supported by ec2-import-instance tool, every time I try to run the command on a vmdk file, I get the following error:
ERROR: File uses unsupported compression algorithm 0
I invoke the tool in the following format:
ec2-import-instance -f vmdk -o <ACCESS KEY> -w <SECRET KEY> <VMDK file>
I am using ec2 tools version 1.6.6.1.
回答1:
Looks like it's got nothing to do with "compression algorithm" but instead more to do with supported vmdk formats as documented in http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html
回答2:
ERROR: File uses unsupported compression algorithm 0. The VMDK was created using OVA format instead of OVF format.
Resolution
Create the VMDK in OVF format.
回答3:
I fixed this for myself by exporting my VM from VirtualBox(where I created it). This exported its into OVF format(I had to change the default exention from OVA to OVF). Then ec2-import-instance worked.
This put me on the right track when converting to RAW using qemu-img did not work.
回答4:
This ec2 migration tool works with both VMware workstation and ESX http://cloudscraper.migrate2iaas.com/ Just run it from your running server.
回答5:
I have experienced the same issue. My solution: the StarWind V2V converter to convert VMDK to RAW (-f RAW) or VHD (-f VHD).
来源:https://stackoverflow.com/questions/14511202/error-importing-vmdk-files-using-ec2-developer-tools