Custom Search

Tuesday, June 11, 2013

How to Import VMware Virtual Machine to Amazon EC2

How to Import VMware Virtual Machine to Amazon EC2

1)
Install ec2-api-tools_1.6
#wget http://launchpadlibrarian.net/111617788/ec2-api-tools_1.6.1.1-0ubuntu1_all.deb
#sudo dpkg -i ec2-api-tools_1.6.1.1-0ubuntu1_all.deb

2)
Check the Version of ec2-api-tools
#ec2-version


3)
Download Vitual Machine from ESXi node in ovf format
#ovftool vi://root:welcome@192.168.12.154/win2k-r2 win2k-r2.ovf

4)
Export Aws Access and Secret keys
#export AWS_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXX
#export AWS_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXX

5)
Create EC2 Instance using *.vmdk
#ec2-import-instance win2k-r2-disk1.vmdk -f VMDK -t m1.small -a x86_64 -b import-export -o $AWS_ACCESS_KEY -w $AWS_SECRET_KEY --region us-west-1

6)
Check the Progress of the task
#ec2-describe-conversion-tasks import-i-ffm2nty0 -O $AWS_ACCESS_KEY -W $AWS_SECRET_KEY --region us-west-1


7)
Resume task
#ec2-resume-import win2k-r2-disk1.vmdk -t import-i-ffm2nty0 -o $AWS_ACCESS_KEY -w $AWS_SECRET_KEY --region us-west-1

8)
Remove the image from S3, when the task completed
#ec2-delete-disk-image -t import-i-ffm2nty0 -o $AWS_ACCESS_KEY -w $AWS_SECRET_KEY --region us-west-1

12 comments:

  1. ec2 import of vm with multiple vmdks - attaching additional disk
    https://forums.aws.amazon.com/thread.jspa?messageID=338626

    ReplyDelete
  2. i am having a vmdk file of openBSD and i want to import this on my AWS and want to run its instance. i follow all the steps mentioned above but i got an error says Client error: unsupported: incomplete root disk. No/etc directory found. Please help me out did i done something wrong ?

    ReplyDelete

  3. Wonderful blog!!! I liked the complete article…. great written,Thanks for all the information you have provided…
    Amazon-AWS Training in Hyderabad

    Hadoop Training in Hyderabad

    ReplyDelete
  4. Interesting article. I have a question. How to use the option export, to bring an EC2 VM to my infrastructure. tnk

    ReplyDelete
  5. Nice post,Thanks for providing us this great knowledge,Keep it up.A good blog F5 LTM Training | F5 ASM Training

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Nice Blog very use full inormation.AWS-certified experts help you develop a cloud strategy which aligns with your business transformation road map and implement cloud management solutions to harness the AWS Cloud Managed Services

    ReplyDelete

  8. Here is the list of best free and paid Windows 10 apps that you should definitely use,
    especially if you are using Windows 10 laptop or Apps for PC.

    ReplyDelete