Boot from volume does not boot from volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Booting from volume does not actually boot from the volume; it boots from a Glance image. Perform the following steps to test this:
Using the GUI steps:
1. In the "Volumes" tab, select "Create Volume". For "Volume Source", select an image (I use CirrOS). Click "Create Volume".
2. On your host machine, open a terminal and overwrite the volume:
$ sudo dd if=/dev/zero of=dev/
3. In the "Instances" tab, select "Launch Instance". For "Instance Boot Source", select "Boot from volume". Be sure to select a flavor with enough storage to support the volume (if using CirrOS, pick m1.tiny). For "Volume", select the volume you created in step 1. Click "Launch".
Using the CLI:
1. Create the volume:
cinder create --image-id $(glance image-list | grep cirros-
2. Overwrite the volume:
$ sudo dd if=/dev/zero of=dev/
3. Boot the volume:
nova boot --flavor m1.tiny --boot-volume sample-volume instance
Expected result: The instance should not boot in either of these cases; the volumes are empty.
Actual result: The instance boots successfully in both of these cases.
Additional test to show that the instance is actually being booted from the Glance image:
Using the CLI:
1. Create the volume:
cinder create --image-id $(glance image-list | grep cirros-
2. Delete the Glance image:
glance image-list | grep cirros-
3. Attempt to boot the volume:
nova boot --flavor m1.tiny --boot-volume sample-volume instance
Expected result: This should succeed; we are attempting to boot from the volume.
Actual result: This fails.
tags: | added: volumes |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | nobody → Sreenivas (sreenivas-pothukanoori) |
Changed in nova: | |
assignee: | Sreenivas (sreenivas-pothukanoori) → nobody |
hi Dane
I tested and reproduce your problem, but I this is an issue.
when build an instance with an volume , nova will fetch the volume meat from that volume.
if you create an volume from an base image. all meta will be saved in the volume in cinder.
nova will get them and set them as
| volume_ image_metadata | {u'kernel_id': u'712e417f- 16ec-42fb- b2cb-ef8c316d99 03', u'container_ format' : u'ami', u'min_ram': u'0', u'ramdisk_id': u'd73b7b35- b89b-4e92- 98fc-dc5a7929f2 14', u'disk_format': u'ami', u'image_name': u'cirros- 0.3.2-x86_ 64-uec' , u'image_id': u'93169d18- 1bb2-45f7- 861c-6735ef687d b9', u'checksum': u'4eada48c2843d 2a262c814ddc92e cf2c', u'min_disk': u'0', u'size': u'25165824'} |
and libvirt found kernel_id and ramdisk_id from glance, it can boot up without issue.
I suggest that you try using another image as base to create a boot volume, then dd it.
the result is nova can boot it up , but after you try to logging it from vnc, failed due to this is not an bootable disk.