← Back to team overview

openstack team mailing list archive

Re: using uec qcow2 images in openstack?

 

On Mon, 26 Sep 2011, Jesse Andrews wrote:

> I can add "ami" style images to diablo nova/glance via:
>
>     wget http://uec-images.ubuntu.com/natty/current/natty-server-cloudimg-amd64.tar.gz
>
>     tar -zxvf natty-server-cloudimg-amd64.tar.gz
>
>     glance add  -A KEYSTONE_TOKEN name="uec-natty-kernel" is_public=true container_format=aki \
>         disk_format=aki < natty-server-cloudimg-amd64-vmlinuz-virtual
>
>     # use the returned id as the kernel for the image
>
>     glance add -A KEYSTONE_TOKEN name="uec-natty" is_public=true container_format=ami kernel_id=4 \
>         disk_format=ami < natty-server-cloudimg-amd64.img

Just in case you were unaware, Ubuntu ships 'cloud-utils' that makes the
above easier.
  cloud-publish-tarball natty-server-cloudimg-amd64.tar.gz my-bucket x86_64


> BUT I don't know how to use the newer oneiric qcow2 image:
>
>     wget http://uec-images.ubuntu.com/oneiric/current/oneiric-server-cloudimg-armel-disk1.img
>
>     glance add  -A KEYSTONE_TOKEN name="uec-oneiric-qcow2"  is_public=true container_format=ovf \
>         disk_format=qcow2 --host=dev2.rcb.me < oneiric-server-cloudimg-armel-disk1.img

Well, specifically in this case, that is an ARM arch disk image.  So
unless you've got a nova-compute node running on arm I would not expect it
to work ;).

I've not used the 'glance add' path, but you can publish those disk images
with cloud-utils via:
 $ wget http://uec-images.ubuntu.com/oneiric/current/oneiric-server-cloudimg-amd64-disk1.img
 $ cloud-publish-image --type image \
     x86_64 oneiric-server-cloudimg-amd64-disk1.img my-bucket
 # note that releases prior to oneiric this command was 'uec-publish-image'

Using the disk images is the preferred method for loading images to nova,
as the disk image path (as opposed to the tarball path above) will boot
using the grub2 loader embedded in the image, and subsequent 'apt-get
dist-upgrade && reboots' will get new kernels.

If you *are* interested in using the partition image path (for
older Ubuntu releases), then to get the kernel upgrade function, you'll
have to use a "loader kernel", which isn't well documented, but can be
found at http://people.canonical.com/~smoser/lucid-loaders/

Scott


References