BootFromVolume


 * Launchpad Entry: NovaSpec:boot-from-volume
 * Created: 2011-Apr-19
 * Contributors: Isaku Yamahata, Yoshiaki Tamura

Summary
Suport EC2 EBS boot with both nova api and ec2 api

Release Note
When this is implemented, VM will be able to boot with volume attached as user specifies. Some related commands and libraries needs to be latest one.(I'm testing it with euca2ools. I don't know about ec2 tools) I'm using Ubuntu 11.04(natty) with some codes replaced.

lp:euca2ools rev 421 I'm using the one from the repo which includes several bug fixes. Maybe more bug fixes might come related to block device mapping.
 * euca2ools

from the google repo. http://code.google.com/p/boto/ https://github.com/boto/boto/commit/6c9e5181193c829b926e5445a90508ba0375e009 or later.(which is newer than officital release 2.0b4) It includes some bug fixes and requires python 2.7 or later. (it doesn't work with python 2.6)
 * boto

boto 2.0bN requires python 2.7 (or later), so I'm using Ubuntu 11.04(natty) I'm not sure tt would be easy to use boto 2.0 on ubuntu 10.x which adopt python 2.6.
 * python 2.7

Rationale
EC2 supports EBS-based boot and openstack doesn't have its counter part. Amazon advocates EBS-based boot benefits than S3-based boot. For openstack, especially we would gain
 * shorter boot time
 * persistent root partition

User stories

 * User registers volume ids or snapshot ids to machine image or specify the ids at boot time.
 * User will see instances booted with volumes attached.

Assumptions
For volume snapshot support, the following blueprints are assumed.
 * volume snapshot
 * clone volume

Design
pass down the informations that is necessary for boot-from-volume will be passed down to compute node and virt driver. During those pass, necessary action will be taken and db will be updated accordingly.

Implementation
enhance machine image to allow volume id/snapshot id. add new column to allows delete-on-terminate parser enhance and pass down those infos compute-api updates volume db to tell compute node which volumes to be used by changing its status into in-use. For supporting ephemeral device or snapshot, more infos needs to be passed to compute node via db or somehow. Currently volume db is used to avoid changing db schema. Check if which volumes are attached. If snapshot ids are specify, create the volumes based on them. Lastly tell virt driver so.
 * machine image support
 * volume db
 * User API
 * ec2 api is already designed by Amazon.
 * nova api with json is to add volume like "volume": {"id":"7", "mountpoint":"/dev/vda"}
 * api node
 * compute node
 * When VM is terminated, delete the volume if delete-on-terminate is specified.

UI Changes

 * AMI setting
 * creating instances

Code Changes
TBD Code changes should include an overview of what needs to change, and in some cases even the specific details.

Migration
TBD Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan
This need not be added or completed until the specification is nearing beta.

Unresolved issues
At the moment EC2 API allows snapshot id to specify boot volume. However right now volume id is used. As a result the patches for euca2ools is necessary which includes bug fix.
 * volume snapshot related stuff.
 * volume snapshot
 * clone volume
 * EC2 API:

BoF agenda and discussion
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.