[openstack-dev] Booting Nova VMs with custom swap/ephemeral devices ?

Vishvananda Ishaya vishvananda at gmail.com
Wed Jan 23 19:50:57 UTC 2013


On Jan 23, 2013, at 7:03 AM, Daniel P. Berrange <berrange at redhat.com> wrote:

> On Wed, Jan 23, 2013 at 03:38:00PM +0100, Nikola Đipanov wrote:
>> On 23/01/13 13:14, Daniel P. Berrange wrote:
>> 
>> Hey Daniel,
>> 
>> So currently root_device_name is populated form the image properties see
>> nova.compute.api.API._validate_and_provision_instance mostly this line:
>> 
>> root_device_name = block_device.properties_root_device_name(
>>                image.get('properties', {}))
>> 
>> and then nova.compute.manager._setup_block_device_mapping just gets it
>> from the instance. So - it can be set on the image but not passed from
>> the command line to boot.
>> 
>> swap and ephemeral are taken in a similar way, but for details see
>> nova.compute.api.API._populate_instance_for_bdm and
>> _update_image_block_device_mapping methods.
>> 
>> Please do correct me if I'm wrong.
>> 
>> I am working on enabling ephemerals and swap from the command line as
>> well as part of
>> https://blueprints.launchpad.net/nova/+spec/improve-block-device-handling targeted
>> for grizzly-3.
> 
> Hmm, this seems to imply it is not currently possible to use the
> features with nova CLI ?  If so, then I wonder why/how did this
> functionality come to exist & be used in the first place ? Perhaps
> there's a way to use it from the EC2 compatible CLI ?

yes you can do it using euca-run-instances for example. It looks like we just left
out some of the never-used params from the nova version.


Vish




More information about the OpenStack-dev mailing list