Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

Why is an image required when booting from volume

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


lorin at nimbisservices

May 26, 2012, 8:22 AM

Post #1 of 4 (583 views)
Permalink
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
Attachments: smime.p7s (4.78 KB)


vishvananda at gmail

May 26, 2012, 8:35 PM

Post #2 of 4 (566 views)
Permalink
Re: Why is an image required when booting from volume [In reply to]

If there is a separate kernel and ramdisk needed for the boot from volume, it is pulled from image properties. Otherwise it is basically useless.

Vish

On May 26, 2012, at 8:22 AM, Lorin Hochstein wrote:

> 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
>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


Gabriel.Hurley at nebula

May 27, 2012, 11:51 AM

Post #3 of 4 (567 views)
Permalink
Re: Why is an image required when booting from volume [In reply to]

To the best of my understanding there are two parts to this, neither of which is fully where it ought to be:


1. It shouldn't be a required parameter. If you give it a volume with everything it needs and not an image it should try to boot from that without throwing an exception. Horizon only enforces the requirement because Nova does.

2. As an optional parameter, specifying an image should allow you to create the instance with that image loaded onto the volume, which is a very important part of the workflow for creating your own bootable volumes. This feature doesn't currently exist in Nova, however.

I also don't know offhand if there are blueprints or bug reports for either of those...


- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of Vishvananda Ishaya
Sent: Saturday, May 26, 2012 8:35 PM
To: Lorin Hochstein
Cc: openstack [at] lists (openstack [at] lists)
Subject: Re: [Openstack] Why is an image required when booting from volume

If there is a separate kernel and ramdisk needed for the boot from volume, it is pulled from image properties. Otherwise it is basically useless.

Vish

On May 26, 2012, at 8:22 AM, Lorin Hochstein wrote:


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<https://www.nimbisservices.com/>




_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists<mailto:openstack [at] lists>
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


ogelbukh at mirantis

May 28, 2012, 12:22 AM

Post #4 of 4 (561 views)
Permalink
Re: Why is an image required when booting from volume [In reply to]

Gabriel,

There is a folsom-targeted blueprint for #2 at least:
https://blueprints.launchpad.net/nova/+spec/auto-create-boot-volumes

--
Oleg

On Sun, May 27, 2012 at 10:51 PM, Gabriel Hurley
<Gabriel.Hurley [at] nebula>wrote:

> To the best of my understanding there are two parts to this, neither of
> which is fully where it ought to be:****
>
> ** **
>
> **1. **It shouldn’t be a required parameter. If you give it a
> volume with everything it needs and not an image it should try to boot from
> that without throwing an exception. Horizon only enforces the requirement
> because Nova does.****
>
> **2. **As an optional parameter, specifying an image should allow
> you to create the instance with that image loaded onto the volume, which is
> a very important part of the workflow for creating your own bootable
> volumes. This feature doesn’t currently exist in Nova, however.****
>
> ** **
>
> I also don’t know offhand if there are blueprints or bug reports for
> either of those…****
>
> ** **
>
> **- **Gabriel****
>
> ** **
>
> *From:* openstack-bounces+gabriel.hurley=nebula.com [at] lists[mailto:
> openstack-bounces+gabriel.hurley=nebula.com [at] lists] *On
> Behalf Of *Vishvananda Ishaya
> *Sent:* Saturday, May 26, 2012 8:35 PM
> *To:* Lorin Hochstein
> *Cc:* openstack [at] lists (openstack [at] lists)
> *Subject:* Re: [Openstack] Why is an image required when booting from
> volume****
>
> ** **
>
> If there is a separate kernel and ramdisk needed for the boot from volume,
> it is pulled from image properties. Otherwise it is basically useless.***
> *
>
> ** **
>
> Vish****
>
> ** **
>
> On May 26, 2012, at 8:22 AM, Lorin Hochstein wrote:****
>
>
>
> ****
>
> 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****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp****
>
> ** **
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.