Introduction to EC2 Images
Unlike other virtual system types, EC2 images (called AMIs or Amazon Machine Images) are not stored on your Cloudmin master system. Instead they are stored as files inside Amazon's S3 storage service, and can be selected when creating a virtual system on EC2.
Each image has a unique ID, like
ami-7c1df915, and a manifest path in S3 like
centos-virtualmin-gpl-3.63/image.manifest.xml . An image can be either made available to everyone, or limited to certain EC2 accounts. Images can also be associated with production codes, indicating that customers must pay to use them.
Creating an EC2 Image
An image is created from a virtual system running on Amazon's EC2 service. The steps to make an image are :
- Select your EC2 system from Cloudmin's left menu, then go to System Operations -> Create EC2 Image.
- Enter a unique directory name for the image in S3 in the S3 bucket for image field. This should typically contain the operating system, version and purpose, such as //centos-5.3-webserver// .
- If you have multiple EC2 accounts, select the one who will own this image from the Save under S3 account menu.
- The size of an image determines the filesystem size of virtual systems create from it. The default is 5GB, but you can enter a larger size in the Size of image filesystem field. Make sure this is at least as big as the root filesystem on the system being imaged.
- If you want anyone to be able to use this image, change Make image publicly available? to Yes.
- If the bucket already contains an image and you want to replace it, change Overwrite AMI in same bucket? to Yes.
- Click the Create Image button.
Once started, Cloudmin will display the progress of the image creation process. This can take up to an hour depending on the size and speed of the system.
Once creation is complete, Cloudmin will display the new image's ID. You can select this on the Create New System page to generate a new EC2 instance that will be a duplicate of the one you imaged. In additional, if you made the AMI publicly available the ID can be shared with any other EC2 users to use.
Managing EC2 Images
You can see all EC2 images Cloudmin knows about at Amazon EC2 -> EC2 Images. By default this includes those you created, images provided by Amazon, and public images from selected other accounts. The accounts to show are set at Cloudmin Settings -> Module Config -> EC2 accounts to display AMIs from.
To change the permissions on an image you created, just click on its ID in the list. On the page that appears you will be able to select if it is public (with the Grant access to everyone checkbox), or only available to a list of EC2 account numbers that you enter.
To remove an image, check the box next to it in the image list and hit the Delete Selected Images button at the bottom of the page. On the confirmation page that appears you will have the option of removing the associated files from S3 too, which is generally a good idea as you are charged for S3 usage by disk space and time.