EC2 is different from other virtualization systems supported by VM2, as it is a hosted service run by Amazon on their machines. They charge by the hour of machine time, and also for storage of any machine images that you create and host on their S3 service.
VM2 can manage virtual systems running under EC2 in almost exactly the same way as it does for other virtualized systems. The biggest difference is that they cannot be shut down without losing the contents of the system, which makes them a little risky for web hosting, as Amazon gives no guarantees of the stability of EC2 instances. Fortunately, Virtualmin makes it easy to backup hosted domains to Amazon's S3 service, which is fast and cheap when accessed from EC2 instances.
The first step in the process of using EC2 is to sign up for an account at Amazon's website, http://aws.amazon.com/ . You will need to provide credit card details for billing. If you already have an Amazon account, adding the EC2 service to it is simple.
Once you have an account, you will need to find out the account number, access key and secret key. This can be done by :
Once you have found your EC2 account number, access key and secret key, the account can be registered with VM2. The steps to do this are :
Assuming that the account details are correct, you will be returned to the list of registered accounts. At the same time, VM2 will contact the Virtualmin webserver to grant your account access to system images containing Virtualmin Pro.
Before you can create any EC2 instances, you must create and register at least one SSH key with EC2. Fortunately, VM2 makes this easy - the steps to follow are :
Assuming that VM2 is able to contact the EC2 servers successfully, a new key will be created and registered. When an EC2 instance is created you must select an SSH key that will be used to initially login to it, and this key must be one generated using this process. Existing keys imported from some other source cannot be used.