Amazon recently announced support for allowing users to boot an instance with an EBS volume as its root partition. When using an EBS root volume, the root filesystem is not lost on system crash or termination, but rather persists on EBS.

Ubuntu currently registers AMIs to allow users to boot "regular" ec2 instances. In addition to that, users have asked for ubuntu images with an EBS root volume.

Release Note

Users of Amazon's EC2 service can now boot Ubuntu Server instances from an EBS root volume. With very little effort or time, a user can easily boot an Ubuntu server on EC2 and take advantage of the distinctive features of EBS over ephermal root.


Prior to its announcment, EBS root was one of EC2's most requested features. Immediately after the announcement users started creating their own Ubuntu based EBS images, and began requesting official images from ubuntu.

EBS root provides many befefits to the user, including convenience, persistance and cost. It much more closely represents a traditional server system.

User stories

  • Gerry would like to use ubuntu on EC2 and prefers the EBS root model. Gerry would like to avoid creating a EBS root volume from scratch.


  • EBS root volume instances are different from instances booted from the local instance store because they can be shut down and started at a later date. While shut down, they can be serviced as any EBS volume. It is possible that EBS root images may not need the same RefreshPolicy as images to be booted with a local instance store.


I expect that the same image that we use for local-store instances on EC2 and for UEC images will be able to be used. Some modifications may need to be made, but we should be able to maintain a single build per architecture.

Therefore, most of the changes here will need to be made in the publishing and registering of our images to EC2.


The implementation should be fairly straight forward. Others have already produced HOWTOs to take an local-store instance and move it to an EBS root. There shouldn't be significant unexpected issues.

The plan is for publishing of ebs root volumes to work like the following:

  • create publish-build-ebs script in ec2-publishing-scripts. This will be call

ed from the uec-build-launcher script after the images have been registered to i nstance-store on ec2.

  • publish-build-ebs will largely follow the alestic ec2-ebs-boot-ubuntu HOWTO

    • [host] boot an instance in each region using 'run-instance-and-wait'. The image that is run will be statically determined for each region.
    • [instance] download the published tarfile from

    • [host] attach a volume to the instance, wait for it to become available
    • [instance] mkfs on attached volume
    • [instance] extract image, mount loopback
    • [instance] copy data from loopbacked image to ebs volume, sync
    • [host] terminate instance
    • [host] detach volume, create-snapshot, delete-volume
    • [host] wait for snapshot to leave pending
    • [host] register
  • publish-build-ebs will ideally work like other publish-build scripts, where it will check if the build is already published and not re-register.
  • ebs root data will be published to query interface

Moving to a newer version of EC2 Tools

Currently, our EC2 Build / Publish / Register process uses an the previous version of the ec2-ami-tools and ec2-api-tools. These older versions of the tools do not have support registering EBS root volumes.

Unfortunately, the new tools are not backwards compatible, so there will be work required to get the publishing tools working with the newer EC2 tools.

More moving parts in the registration process

Currently, our publish and registration process takes place entirely on our build/publish system. In order to register a EC2 EBS volume, we will need to do so from inside EC2. This means that to register an image, we will have to start up an ec2 instance, connect to it and issue some commands, and then bring it down.

This is not at all impossible, but it is significantly more moving parts and possibilities for instability than we have right now.

Differences between local-store and EBS root instances

  • User Data / Instance Meta Data can differ in same instance
    instance data (user-data and kernel/ramdisk) can be modified during the lifetime of a EBS root instance. In local store instances, the metadata and instance data is permanent for the life of the instance. There may be some assumptions that need fixing in ec2-init to address this, and possibly figuring out what the right behavior is for certain changes.

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users.  Use this section to describe a short plan that anybody can follow that demonstrates the feature is working.  This can then be used during testing, and to show off after release. Please add an entry to for tracking test coverage.

This need not be added or completed until the specification is nearing beta.

Unresolved issues

  • RefreshPolicy: Does it make sense to use the same refresh policy as other EC2 images, or should that differ here.

  • Cost: We should do some investigtion on how much additional cost there will be for the EBS volumes.


ServerLucidEc2EBSRoot (last edited 2010-03-04 02:40:40 by smoser)