Ask Your Question

heat boot from volume

asked 2014-08-19 01:15:24 -0600

laocius gravatar image

I am trying to launch my instance from cinder volume with heat template, but no success. If I create a volume manually and then boot from it, everthing's OK.

Here's part of my heat template.

    type: OS::Nova::Server
    depends_on: Pilot_Root_Disk
    metadata: { resource_facade: metadata }
          template: $system_name-$rcs
            $system_name: { get_param: system_name }
            $rcs: { get_param: rcs }
      availability_zone: { get_param: avail_zone }
      flavor: { get_param: flavor }
      networks: { get_param: [ network_list, Network-List ] }
      security_groups: { get_param: security_groups }
      block_device_mapping: [
        { delete_on_termination: true,
          device_name: vda,
          volume_id: { get_resource: Pilot_Root_Disk } }
      user_data_format: RAW
      user_data: { get_param: user_data }
      config_drive: "true"

    type: OS::Cinder::Volume
      availability_zone: { get_param: avail_zone }
      size: 220
      image: { get_param: image }
          template: $system_name-$rcs-vda
            $system_name: { get_param: system_name }
            $rcs: { get_param: rcs }

In scheduler.log, I saw:

compute-08 (node compute-08.local): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 1305, in _build_instance\n    set_access_ip=set_access_ip)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 393, in decorated_function\n    return function(self, context, *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 1717, in _spawn\n    LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', u'  File "/usr/lib/python2.6/site-packages/nova/openstack/common/", line 68, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 1714, in _spawn\n    block_device_info)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 2265, in spawn\n    block_device_info)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 3656, in _create_domain_and_network\n    power_on=power_on)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 3559, in _create_domain\n    domain.XMLDesc(0))\n', u'  File "/usr/lib/python2.6/site-packages/nova/openstack/common/", line 68, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 3554, in _create_domain\n    domain.createWithFlags(launch_flags)\n', u'  File "/usr/lib/python2.6/site-packages/eventlet/", line 179, in doit\n    result = proxy_call(self._autowrap, f, *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/eventlet/", line 139, in proxy_call\n    rv = execute(f,*args,**kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/eventlet/", line 77, in tworker\n    rv = meth(*args,**kwargs)\n', u'  File "/usr/lib64/python2.6/site-packages/", line 708, in createWithFlags\n    if ret == -1: raise libvirtError (\'virDomainCreateWithFlags() failed\', dom=self)\n', u"libvirtError: cannot open file '/var/lib/nova/instances/3310bf49-82d0-467d-8b9b-de8d453cdef8/disk': No such file or directory\n"]
edit retag flag offensive close merge delete


Is it caused by the metadata injection?

laocius gravatar imagelaocius ( 2014-08-19 01:25:16 -0600 )edit

Hi, I am also trying to achieve the same but unable to do so. Getting below error:

ERROR: Neither image nor bootable volume is specified for instance <instance_name>

help required.

Amit Kumar gravatar imageAmit Kumar ( 2014-10-30 06:15:40 -0600 )edit

Was this ever solved? I am having the exact same issue. depends_on seems to have no effect on my template.

eGGnog gravatar imageeGGnog ( 2017-01-19 15:58:57 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-31 04:07:58 -0600

manojhirway gravatar image

It looks like the instance is getting spawned even before the volume is getting created succesfully. The "depends_on" attribute doesn't seem to have any effect.

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


Asked: 2014-08-19 01:15:24 -0600

Seen: 1,283 times

Last updated: Aug 31 '15