Virtualmin GPL AMI

Posted 2010-01-26 20:06 by Joe

AMI Summary

Region Location Operating System AMI
US East Virginia CentOS ami-9129eff8
US East Virginia Debian ami-6735f30e
US West California CentOS ami-1b0f525e
Europe Ireland CentOS ami-bce1d1c8
Southeast Asia Singapore CentOS ami-503c4702
Northeast Asia Japan CentOS ami-d0b80dd1
US East Virginia Amazon Linux ami-c5cd70ac

Virtualmin GPL AMI on EC2

Amazon's Elastic Computing Cloud (EC2) is a commercial service that provides virtual Linux systems running on Amazon's network, for which customers are charged by the hour. One of its useful features is the ability to launch a virtual system using a machine image (AMI) defined by another user, which could contain anything from a basic install of Linux up to a full application stack.

If you have an EC2 account, you can easily launch an image ( ami-9129eff8 ) containing Webmin, Virtualmin, Usermin and all the dependent programs like Apache, MySQL and Postfix, all running on CentOS. This lets you bring up a web hosting server in minutes, and either try out Virtualmin or start using it for real web hosting. The steps to do this are :

  1. Sign up for an Amazon EC2 account on their registration page.
  2. Follow Amazon's getting started instructions to install the needed tools, in particular the Prerequisites, Setting up an Account and Setting up the Tools pages.
  3. Once you have the ec2 commands working, use the following command to list available Virtualmin AMIs :
    ec2-describe-images -o 541491349868 

    You should see at least one in the available state.

  4. Setup an SSH key with the commands :
    ec2-add-keypair vgpl-keypair >~/.ssh/id_rsa-vgpl-keypair
    chmod 700 ~/.ssh/id_rsa-vgpl-keypair
  5. Start a new instance with the AMI for Virtualmin GPL with the command :
    ec2-run-instances ami-9129eff8 -k vgpl-keypair

    This will output the new instance ID, with is like i-10a64379

  6. Check its status with the command :
    ec2-describe-instances

    You will need to wait until it is in the running state. You will then be able to see the public hostname, which looks like ec2-72-44-33-55.z-2.compute-1.amazonaws.com .

  7. Open the needed firewall ports with the commands :
    ec2-authorize default -p 22
    ec2-authorize default -p 25
    ec2-authorize default -p 10000
    ec2-authorize default -p 10001
    ec2-authorize default -p 10002
    ec2-authorize default -p 10003
    ec2-authorize default -p 10004
    ec2-authorize default -p 10005
    ec2-authorize default -p 10006
    ec2-authorize default -p 10007
    ec2-authorize default -p 10008
    ec2-authorize default -p 10009
    ec2-authorize default -p 20000
    ec2-authorize default -p 80
    ec2-authorize default -p 443
    ec2-authorize default -p 21
    ec2-authorize default -p 20
    ec2-authorize default -p 110
    ec2-authorize default -p 143
    ec2-authorize default -p 53
    ec2-authorize default -p 53 -P udp
  8. Try a test SSH login with the command :
    ssh -i ~/.ssh/id_rsa-vgpl-keypair root@ec2-WHATEVER.compute-1.amazonaws.com
    For Amazon Linux AMIs, you will need to login as ec2-user instead of root, and then run sudo bash to get a root shell.
  9. Connect to Webmin at the URL : https://ec2-WHATEVER.compute-1.amazonaws.com:10000/ . The initial login is root and password is changeme .
  10. Click on the Webmin link in the top-left, open the Webmin category, click on Change Language and Theme, and enter a new password!
  11. To ensure that all packages are up to date, click on System Information at the bottom of the left frame. If you are prompted to install any packages on the information page that appears on the right, do so.
  12. Click back on the Virtualmin link on the top-left, and click on Create Virtual Server to create your first domain.

Virtualmin EC2 Image in Europe

EC2 now has a separate European region, which has it's own set of machines and AMIs. To launch the Virtualmin image in Europe, follow the instructions above but use the AMI ami-bce1d1c8 instead.

Also, you will need to set the EC2_URL environment variable before using the command-line tools, with a statement like :

export EC2_URL=https://eu-west-1.ec2.amazonaws.com

Virtualmin GPL Debian Squeeze Image

An EC2 image now exists for Virtualmin GPL on Debian 6.0 (Squeeze). The instructions for starting this are exactly the same as above, but the image ID is ami-6735f30e . So the command to start it would be :

ec2-run-instances ami-6735f30e -k vgpl-keypair

Amazon Linux Image

Amazon now offers a free usage tier for EC2, which allows you to run a micro-sized EC2 instance for a year for free. Virtualmin offers an AMI for these micro instances with ID ami-faea4f93 - however, this AMI is built on Amazon's own Linux distribution, which is similar to Fedora or Redhat Linux. The command to start it would be :

ec2-run-instances ami-c5cd70ac -k vgpl-keypair
New AWS Region ap-southeast-2 Sydney, AU

HI,

Would it be possible for the prebuilt AMI's to be copied to the new Sydney Australia (ap-southeast-2) region please?

Cheers, Simon

Posted by SimonHorn on Thu, 2012-11-22 18:40
Security Fail ami-faea4f93 backdoor

The ami-faea4f93 image comes preloaded with Virtualmin's ssh key allowing them root access to any of your instances based on this ami.

The fix is to clean out the first of 2 lines of these two files: /root/.ssh/authorized_keys /home/ec2-user/.ssh/authorized_keys

Posted by ttl4fr on Thu, 2012-09-06 14:13
SSH key

That's odd, as our image creation process is supposed to remove our SSH keys - and also, Amazon doesn't allow creation of AMIs with extra keys in them.

Could you post the Virtualmin SSH key line from /root/.ssh/authorized_keys ?

Posted by JamieCameron on Thu, 2012-09-13 15:36
EU AMI

Hi, I created an instance using the EU AMI but did not last long as its going to unstable. When ever I restarted its ok but then its un reachable after a while & heath check fails. I assume this is because of OS problem. When I create the instance I selected Kernel ID & RAM Disk ID as DEFAULT.

Could any one please tell me the be st Kernel ID & RAM Disk ID for this AMI?

Many Thanks in Advance!

Posted by milindras on Tue, 2012-07-17 05:05
image in São Paulo / Brazil

I'm glad to hear this news.

I'm in South america, a picture would have available for new data center in São Paulo / Brazil (sa-east-1a)

I'm anxious to test the Virtualmin Amozon

Grateful.

Posted by bernardo on Fri, 2012-04-27 08:13
Firewall Configuration

You might want to change the instructions a bit: The firewall on an EC2 instance is called a "security group" and is configured outside the EC2 instance. In fact, the security group has to be created/configured PRIOR to launching the instance, since security group membership is specified at launch time only and you CANNOT CHANGE which security group applies to an instance after the instance is launched.

Read here for confirmation of what I am saying: https://forums.aws.amazon.com/thread.jspa?threadID=78175

Posted by eddieb on Fri, 2012-04-20 17:00
EBS instead of instance store

Hello,

I successfully completed setup using the information above ;-)

I would now like to setup EBS backing instead of instance store - I've searched for clear instructions how to do this but i'm a little stuck.

So far I have;

  • formatted a new EB volume /dev/sdf as an extended 3 filesystem
  • created directory /mnt/target and mounted /dev/sdf at /mnt/target
  • rsync’d the root instance-store filesystem to the ebs volume
  • synchronized the /dev directory from the instance-store filesystem
  • flush all pending write ops, and unmount the EBS volume

I now need to create my new AMI, but I don't quite understand how.

Any help would be greatly appreciated.

James

Posted by Brants on Sat, 2012-02-11 16:17
convert to EBS

I was eager to convert ami-9129eff8 to an EBS-booting equivalent, so I followed the steps in this walkthrough to create an AMI from a freshly launched instance of ami-9129eff8. The results are now in ami-5485573d (made public) which is completely unmodified from the original other than having an EBS volume instead of ephemeral storage.

Posted by devvyn on Tue, 2012-02-21 23:00
FIRST - STEP 3 CONFUSION In

FIRST - STEP 3 CONFUSION In step 3:

ec2-describe-images -o 093590521311

You'll likely get nothing back. Instead, try: $ ec2-describe-images -a | grep virtualmin

which will show you the GPL, Pro, and Squeeze (?) versions. You want the GPL version...

For whatever reason, this guide gets that right in step 5.

SECOND - SECURITY ISSUE If you change your password with the passwd, note that your virtualmin password for root will stay as "changeme". Make sure you update it by going to Webmin->Webmin->System Users->root, then choose "Unix Authentication" and save.

Posted by AlexCook on Sat, 2012-01-28 23:38
how would I go about

how would I go about deploying said image under the free tier (613MB RAM) instead of the default 1.7GB RAM? Mallsson

Posted by ElliCrider on Thu, 2011-08-04 19:04
micro tier

Unfortunately we don't have an AMI suitable for use on the micro tier currently. That said, running Virtualmin with only 613 MB of RAM is likely to have poor performance..

Posted by JamieCameron on Thu, 2011-08-04 19:10
Free Tier

how would I go about deploying said image under the free tier (613MB RAM) instead of the default 1.7GB RAM?

Posted by eddieb on Mon, 2011-04-18 11:23
EC2 Free Tier

I'd also like to be able to do this but when I use a base Cent OS 32bit install from rightscale, I dont' have the option to use the micro tier. Is there an AMI that can be used that will allow this micro tier?

Posted by jasondebruler on Tue, 2011-05-03 21:30
Micro tier

Good news - we now have a micro tier AMI, which uses Amazon Linux. The ID is : ami-5ae43f33

Posted by JamieCameron on Fri, 2012-04-20 16:35
Micro tier

Currently we don't have an image for the micro tier. But you can just create a CentOS EC2 instance and install Virtualmin GPL onto it using the regular install script ..

Posted by JamieCameron on Tue, 2011-05-03 23:41
which is what I did and it

which is what I did and it works great!

Posted by eddieb on Wed, 2011-05-04 08:14
Which image did you use

Hello, Which image did you use to start ? Thanks Dimitri

Posted by lekiend on Sun, 2011-07-24 10:10