Ask Your Question

How to set "bootable" attribute to a volume using HEAT template

asked 2015-08-28 04:00:00 -0500

manojhirway gravatar image

updated 2015-08-28 05:46:28 -0500

HEAT template allows use to create a Cinder volume. However, I cannot mark it as "bootable" using the template. There is a command line : cinder set-bootable <volume-id> True However, I want to do the same using the HOT template. Anyone knows how to do this ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-08-28 05:46:02 -0500

updated 2015-08-28 06:30:26 -0500

Hi, you can make a volume bootable adding the propertie image: <IMAGE_ID>

heat_template_version: 2013-05-23
    type: OS::Cinder::Volume
      description: <OWN_DESCRIPTION>
      image: <IMAGE_ID>
      name: <VOLUME_NAME>
      size: <GB>

There is an attribute bootable: True that marks a volume as bootable

edit flag offensive delete link more


Thanks for that Eduardo. But it looks like "bootable" is not recognized as a property. Its an attribute. So, adding the property : bootable : true gives me an error saying that this is not a valid property.

I do not want to use a glance image as a source for this volume.

manojhirway gravatar imagemanojhirway ( 2015-08-28 06:05:51 -0500 )edit

Sorry, you are right, it is an attribute. I don't really know if there is a way to modify an existing volume with heat. Cinder-heat ref:

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-08-28 06:42:03 -0500 )edit

Attributes goes outside properties section

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-08-28 06:47:47 -0500 )edit

answered 2018-01-24 11:46:45 -0500

rasca gravatar image

The bootable setting is automated once you create the volume and map it to the instance. You can't (as far as I know) set an attribute in the template. So, say you have:

    type: OS::Cinder::Volume
      name: "instance_volume"
      size: 10

And then you want this to become a boot device for your resource. You'll do:

instance: type: OS::Nova::Server properties: name: "instance_name" ... ... block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : instance_volume }, delete_on_termination : "true" }]

And the created volume will be automatically set as bootable:

[stack@undercloud ~]$ openstack volume show instance_volume|grep bootable
    | bootable                     | true
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-08-28 04:00:00 -0500

Seen: 1,567 times

Last updated: Aug 28 '15