Invalid Block Device Mapping(Boot from Image creates volume)

asked 2014-08-21 23:45:59 -0500

Praveenkumar.2608 gravatar image

updated 2014-08-22 06:03:26 -0500

Error.jpg(/upfiles/14087053797710272.jpg)I am trying to boot QCOW2 image with Boot from image(Create a Volume) option but I am getting invalid Block Device Mapping. I am using Icehouse version of Openstack running it on Centos 6.5(Final). I can see the fix has been propose but not able to find detail steps on how to apply the fix. Please provide me with some insight on this issue.

Nova Version :- 2014.1.1-3.el6

Tried Boot from Image creates volume at 12:47 same issue . Attached the compute.log

Note:

I am able to create Volume with the image and boot it using boot from volume option. I am also able to boot from image and attach volume to it.

> 12:48:13.245 15238 INFO
> oslo.messaging._drivers.impl_qpid [-]
> Connected to AMQP server on
> Controller:5672 2014-08-22
> 12:48:14.409 15238 WARNING
> nova.compute.manager
> [req-2ab3cf91-e898-48d2-8175-bbd4b46f4bec
> c90e6643cb7b4353a5bdbb136fed7c3e
> c122ead8a1e140d0988797e092991e15]
> Volume id:
> 5afb7ebc-4ca7-4592-8b2d-b6674d73115f
> finished being created but was not set
> as 'available' 2014-08-22 12:48:14.487
> 15238 ERROR nova.compute.manager
> [req-2ab3cf91-e898-48d2-8175-bbd4b46f4bec
> c90e6643cb7b4353a5bdbb136fed7c3e
> c122ead8a1e140d0988797e092991e15]
> [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204]
> Instance failed block device setup
> 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204]
> Traceback (most recent call last):
> 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/compute/manager.py",
> line 1682, in _prep_block_device
> 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> self.driver,
> self._await_block_device_map_created))
> 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/virt/block_device.py",
> line 367, in attach_block_devices
> 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> map(_log_and_attach,
> block_device_mapping) 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/virt/block_device.py",
> line 365, in _log_and_attach
> 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> bdm.attach(*attach_args,
> **attach_kwargs) 2014-08-22 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/virt/block_device.py",
> line 322, in attach 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> volume_api, virt_driver) 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/virt/block_device.py",
> line 44, in wrapped 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> ret_val = method(obj, context, *args,
> **kwargs) 2014-08-22 12:48:14.487 15238 TRACE nova.compute.manager
> [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/virt/block_device.py",
> line 217, in attach 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> volume_api.check_attach(context,
> volume, instance=instance) 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> File
> "/usr/lib/python2.6/site-packages/nova/volume/cinder.py",
> line 228, in check_attach 2014-08-22
> 12:48:14.487 15238 TRACE
> nova.compute.manager [instance:
> 9303edf7-646b-4eeb-86f9-95c728105204] 
> raise
> exception.InvalidVolume(reason=msg)
> 2014-08-22 ...
(more)
edit retag flag offensive close merge delete

Comments

Please , provide CLI for booting instance, or describe sequence of steps in dashboard.

dbaxps gravatar imagedbaxps ( 2014-08-22 05:13:43 -0500 )edit

Hi,

Thank you for helping me on this. Here is the steps I follow and also attached the screenshot to the original request by editing it , since I was not able to attach screenshot in this comment.

  1. Click Launch instance and selected availability zone
  2. Selected the option boot from image (create a new volume). Image is Qcow2
  3. Specified the disk space and then clicked launch
Praveenkumar.2608 gravatar imagePraveenkumar.2608 ( 2014-08-22 06:02:42 -0500 )edit

CLI command is as follows:

nova boot --flavor e722bc0d-ec5f-47f4-b539-d519b74b23ba \ --block-device source=image,id=1d75970a-6ea4-4543-bce0-3114387b5df4,dest=volume,size=170,shutdown=preserve,bootindex=0 \ myInstanceFromVolume

Praveenkumar.2608 gravatar imagePraveenkumar.2608 ( 2014-08-22 06:09:58 -0500 )edit

nova boot --flavor 1 --block-device source=image,id=d0e90250-5814-4685-9b8d-65ec9daa7117,dest=volume,size=5,shutdown=preserve,bootindex=0 VF20RS012
The last command contains wrong flavor , I guess

dbaxps gravatar imagedbaxps ( 2014-08-22 06:29:51 -0500 )edit

--flavor e722bc0d-ec5f-47f4-b539-d519b74b23ba is custom flavor that I have created for my instance.

Praveenkumar.2608 gravatar imagePraveenkumar.2608 ( 2014-08-22 06:43:17 -0500 )edit