Custom Search

Wednesday, June 19, 2013

How to Import XEN Virtual Machine to Amazon EC2

How to Import XEN 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)
Export Aws Access and Secret keys
#export AWS_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXX
#export AWS_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXX

4)
Create EC2 Instance using RAW Disk
#ec2-import-instance win2k-r2-disk1.xm -f RAW -t m1.small -a x86_64 -b import-export -o $AWS_ACCESS_KEY -w $AWS_SECRET_KEY --region us-west-1

5)
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

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

7)
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

No comments:

Post a Comment