[Openstack] [Cinder/Heat]: How do you define in a template an instance that boots from volume?

Juha Tynninen juha.tynninen at tieto.com
Mon Dec 9 12:34:10 UTC 2013


Thanks.

Isn't the "EC2 MountPoint Property Type" used in Volumes property for
mounting storage volumes when the VM instance is already running? So the
effect would be similar to this working example:

 "DemoInstance" : {
   "Type" : "AWS::EC2::Instance",
   "Properties" : {
     "KeyName" : { "Ref" : "KeyName" },
     "ImageId" : "cirros-0.3.1-x86_64-disk",
     "InstanceType": "m1.small"
   }
  },

  "StorageVolume" : {
   "Type" : "OS::Cinder::VolumeAttachment",
   "Properties" : {
     "instance_uuid" : { "Ref" : "DemoInstance" },
     "mountpoint" : "/dev/vdb",
     "volume_id" : "04fbad7a-41bf-41d9-9b53-2c2bb715f25c"
   }
  }

...but the question remains is it possible somehow to define that the
instance is started (booted) from the volume. E.g. instead of ImageId
defined for AWS::EC2::Instance, define the reference to the  volume
somehow.



On 9 December 2013 12:56, Juha Tynninen <juha.tynninen at tieto.com> wrote:

> Hi,
>
> I'm using stable/havana version of Openstack.
>
> I can boot instance from the pre-existing bootable Cinder volume with nova
> command:
> nova boot --flavor 2 --block_device_mapping vda=<volume id>:::0 <name for
> instance>
>
> ...but how can this be done with a Heat template? Or can it be done?
>
> AWS::EC2::Instance resource doesn't seem to have a property for this.
>
> Thanks,
> -Juha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131209/26da0998/attachment.html>


More information about the Openstack mailing list