1
votes

Has anyone been successful to upload a modern.ie vdmk image to aws ec2? I've tried via the ec2 import instance command:

ec2-import-instance IE10.Win7.For.Windows.VMWare\IE10_-_Win7-disk1.vmdk -f vmdk -t t2.small -a i386 -b xxxx --subnet subnet-xxxxx -p Windows -o %AWS_ACCESS_KEY% -w %AWS_SECRET_KEY% ...

but once i described the import, i got: ClientError: Unsupported Windows OS

After some reading I attempted to create an AMI via the aws cli interface after loading the file to s3 creating the policies etc:

aws ec2 import-image --cli-input-json "{ \"Description\": \"ModernIE Win7IE10\", \"DiskContainers\": [ { \"Description\": \"First CLI task\", \"UserBucket\": { \"S3Bucket\": \"xxx_temp\", \"S3Key\" : \"IE10_-_Win7-disk1.vmdk\" } } ], \"LicenseType\": \"BYOL\", \"Architecture\": \"i386\", \"Platform\": \"Windows\"}"

But describing the import i get : "StatusMessage": "ClientError: Disk validation failed [Invalid S3 source location]"

I've even made the bucket url public!

Anyone have any ideas?

Thanks!

2
Or if anyone knows of a publicly available AMI?Julian

2 Answers

0
votes

Use the AWS CLI to test that error:

aws s3 ls s3://xxx_temp

If you do not see the IE10_-_Win7-disk1.vmdk listed there, then the S3 upload is your problem. Re-verify your S3 key.

Also check the bucket policy and make sure the configured IAM user for your CLI has access to that bucket.

0
votes

If you're seeing the Unsupported Windows OS I would check the Prerequisites very carefully.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites-ImportInstance.html

Not all operating systems can be imported. I frequently have an issue importing a linux VM where I've upgraded the kernel version and it becomes "Unsupported". The importer is very picky.

During the import process you can use the identifier returned from the import command to follow its status like so:

aws ec2 describe-import-image-tasks --cli-input-json "{"ImportTaskIds":["$IMPORT_ID"]}"

I have been most successful converting the VM to an OVA first, uploading THAT to S3 and running the import command against that.

If you are using VirtualBox you can do that from the command line:

vboxmanage export ${VM_NAME} -o MyExportedVM.ova;