Converting VMWare virtual machine to an Amazon EC2 instance
One day we were wondering, whether one could use the Amazon EC2 cloud to host a VMWare virtual machine. VMWare is in extensive use in our day-to-day work, but it has certain caveats as in order to really dynamically scale with your needs, you need quite a lot of hardware available. Which is expensive and / or cumbersome to have around.
Amazon EC2 is cost-effective way to overcome the need for keeping your own hw lying below your desks, but it has it’s own AMIs (Amazon Machine Images) instead of VMWare images.
VM Import enables you to easily import virtual machine images from your existing environment to Amazon EC2 instances.
A-ha, with some googling, it seems like Amazon provides tools to do just what we want (VM Import). Seems like I need to study those command line tools provided by Amazon, to get things going.
Setting up…
- Download tools from Amazon : http://aws.amazon.com/developertools/351
- Check prereqs (JAVA basically): http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/prerequisites.html
- Setup: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/setting-up-your-tools.html
Ok… doing the setup:
$ export EC2_HOME=/opt/ec2-api-tools-1.5.2.4$ export PATH=$PATH:$EC2_HOME/bin$exportEC2_PRIVATE_KEY=~/.ec2/pk-HKZYKTAIG2ECMXYIBH3HXV4ZBEXAMPLE.pem$exportEC2_CERT=~/.ec2/cert-HKZYKTAIG2ECMXYIBH3HXV4ZBEXAMPLE.pem$ export EC2_URL=https://ec2.eu-west-1.amazonaws.com
