Ask Your Question
0

HOT template - boot instance from volume

asked 2015-05-17 13:03:33 -0500

I'm trying to boot an instance from a volume using a HOT template. Unfortunately the creation of the instance fails (I just get a very generic "Error" as message) while the volume creation works. If I create an instance from an image things work as they should. As I only have access via Horizon I fear that my debugging capabilities are quite limited.

Here's my template (I use hardcoded parameters for testing)

heat_template_version: 2013-05-23

description: boot instance from volume


resources:
  my_instance:
    type: OS::Nova::Server
    depends_on: cinder_volume
    properties:
      key_name: my_key
      flavor: c1.micro
      name: test
      networks: [{"network": "private"}]
      block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : cinder_volume }, delete_on_termination : "true" }]


  cinder_volume:
    type: OS::Cinder::Volume
    properties:
      size: 10
      image: "Ubuntu Trusty 14.04"

This question has been asked before, but I didn't find any solution.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-26 22:29:49 -0500

nd gravatar image

Hi,

I faced exactly the same problem and found out that in openstack versions prior to Kilo it is required to specify image: in the Heat template. So as a workaround, what I did was to create a dummy image using dd if=/dev/zero of=dummy.img count=1000 bs=1024 which creates a 1MB zero padded image file. Upload this image to openstack glance and use this image for any such deployments by adding image: dummy.img to your Heat template - you can keep your remaining template as it is. Hope this helps.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-05-17 13:03:33 -0500

Seen: 2,087 times

Last updated: May 17 '15