This is how to install an official EC2 image using vmbuilder.

Karmic Koala (9.10) and Later

The EC2 additions to vmbuilder have been packaged and are available:

apt-get install python-vm-builder-ec2

Older releases

Note: This is a draft version. The changes in the vmbuilder-intrepid-ec2 bzr branch have not been integrated back in to the proper vmbuilder tree just yet so these instructions are bound to change.

  1. Install the necessary tools to build and run vmbuilder
    sudo apt-get install bzr cdbs python-all-dev python-epydoc \
      kvm debootstrap parted kpartx ubuntu-keyring             \
      dpkg-dev python-boto python-cheetah ec2-ami-tools        \
      devscripts build-essential
  2. Grab the EC2 changes that were made to vmbuilder.
    bzr branch lp:~zulcss/vmbuilder/vmbuilder-intrepid-ec2
  3. Grab the ec2-scripts that are needed to configure the image when it first starts and when the user logs in for the first time.
    bzr branch lp:~zulcss/ec2-scripts/trunk zulcss-ec2-scripts
  4. Build the package:
    (cd vmbuilder-chuck; debuild -uc -us)
  5. Install the debs.
    sudo dpkg -i                \
      python-vm-builder_*.deb   \

Building a VM

  1. Run the following command. It will build, bundle, and upload the image for you.
    sudo vmbuilder xen ubuntu --suite={hardy,intrepid,karmic} --ec2 \
      --ec2-cert=<place where your ec2 cert is>                  \
      --ec2-key=<place where your ec2 key is>                    \
      --ec2-access-key=<your aws access key>                     \
      --ec2-secret-key=<your aws secret key>                     \
      --ec2-user=<your aws # number>                             \
      --ec2-bucket=<your ec2 bucket name>                        \
      --ec2-prefix=<image prefix>                                \
      --ec2-version="Description of your EC2 image"              \
      --firstboot=/usr/share/doc/python-vm-builder-ec2/examples/            \
      --part=/usr/share/doc/python-vm-builder-ec2/examples/ec2-<arch>-part-file.txt         \

If you're running an earlier release of Ubuntu, you'll need to replace the scripts in /usr/share/doc/python-vm-builder-ec2/examples with the scripts in the zulcss-ec2-scripts bzr checkout you did earlier.

EC2Vmbuilder (last edited 2009-11-09 22:33:21 by dsl081-160-145)