AutoCreateBootVolumes


 * Launchpad Entry: NovaSpec:auto-create-boot-volumes
 * Created: 2011-Oct-24
 * Contributors: Dan Kim

Summary
Support Creating EBS boot volumes when boot-time

Release Note
When this is implemented, VM will use auto-created volumes as root and local(defined on flovor 'local_gb').

The 'auto_create_boot_volumes' flag should be True to tragger this logic.

Rationale
With BootFromVolume blueprint, we can use a volume as root like EC2 supports EBS-based volume.

But it needs pre-created and pre-os-installed volumes.

With this blueprint, There's no need the pre-created volume.

Below steps will be added.

1) create volumes using volume-manager on boot time.

2) copy cached OS image into the root volume device.

3) inject ssh key or metadata or files into the root volume device if it needs.

User stories

 * Administrator will set 'auto_create_boot_volumes' flag to True.
 * User will see instances booted with volumes attached.

Assumptions
For root volume support, the following blueprints are assumed.


 * boot from volume

Implementation
add 'auto_create_boot_volumes' flag and set it True
 * nova.conf
 * compute node
 * Compute Manager should call Volume Manager to create volumes on boot time.
 * Virt Driver should copy the OS images to the root volume.
 * Virt Driver should inject ssh key or files into the root volume.

Code Changes

 * /nova/compute/manager.py
 * /nova/virt/libvert/connection.py

Migration

 * When 'auto_create_boot_volumes' is added on nova.conf,
 * the cached images have to be deleted. in common case, it's '/var/lib/nova/instances/_base/...'
 * to synchronize the size between volume and image.

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

Unresolved issues
TBD

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.