openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #12369
Why is an image required when booting from volume
I'm trying to figure out boot from volume, both so I can use it and so I can add it to the docs.
It seems that when calling "nova boot" or using Horizon, you need to specify an image. Why is that?
I naively tried to create a volume image by creating a volume and then doing on my volume server:
dd if=/tmp/precise-server-cloudimg-amd64-disk1.img of=/dev/nova-volumes/volume-0000000d
Then I tried this:
$ nova boot --flavor 2 --key_name lorin --block_device_mapping /dev/vda=13:::0 test
Which generated an error:
Invalid imageRef provided. (HTTP 400)
If I try to specify an image, it at least attempts to boot:
$ nova boot --flavor 2 --key_name lorin --block_device_mapping /dev/vda=13:::0 --image 7d6923d9-1c13-4405-ba0c-41c7487dd6bc test
I noticed that the devstack example specifies an image: https://github.com/openstack-dev/devstack/blob/master/exercises/boot_from_volume.sh:
VOL_VM_UUID=`nova boot --flavor $INSTANCE_TYPE --image $IMAGE --block_device_mapping vda=$VOLUME_ID:::0 --security_groups=$SECGROUP --key_name $KEY_NAME $VOL_INSTANCE_NAME | grep ' id ' | get_field 2`
Looking at nova/api/openstack/compute/servers.py, it does look like _image_uuid_from_href() is called regardless of whether we are booting from volume or not. What is "--image" used for when booting from volume?
Take care,
Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
Follow ups