Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Whenever I set up a devstack or OpenStack deployment, I want to add the latest LTS Ubuntu server image. I succeeded several times in the past and I believe it can be achieved with something like:

wget http://uec-images.ubuntu.com/releases/12.04.2/release/ubuntu-12.04.2-server-cloudimg-amd64-disk1.img
glance image-create --is-public true --disk-format qcow2 --container-format bare --name "precise" < ubuntu-12.04.2-server-cloudimg-amd64-disk1.img

I wonder, though, where can I find the officially supported documentation on doing this? How can I contribute to it? I sometimes experience problems and without official instructions I'm never sure if it's the above command or my deployment. I tried adding these instructions to the OpenStack official docs and/or the accompanying Disqus comments on two occasions, but these would get removed and I can't find a consistent, supported manual to do this, I would expect very basic, procedure.

Also, what about the elusive cloud-init options to guest images? Where can I find instructions on how to use those? From the terminal and from the web UI? I once had to go fishing for this information in the source code.

What I found so far is the site listing the available images, but one that doesn't state what are the formats of the images - I always have to google for this information. There is the UEC wiki that lists many recipes on how to create your own images, but not how to use existing ones (or the premade ubuntu cloud images). Then there is the most easily found "cloud" category on ubuntu.com that only links to some promotional pamphlets and the uninformative cloud images listing.

I know that this is a semi-bug report (which I would like to see fixed or help fix :) ), but I would also like to know the answers to the questions I posed.

share|improve this question
    
+1 from me, if i try and upload the .tar.gz file downloaded from Ubuntu, it won't boot (No bootable device), i'm assuming QCOW2 format when i fill in the upload form. I have to revert to the cli to get a working image. –  Chris White Oct 12 '13 at 23:08

2 Answers 2

I was having the same issue, so I ended up downloading all the "trusty-server-cloudimg-amd64" prefixed images. There was a tar which when unzipped contained a README.files that provided some information:

This compressed tar archive contains files relevant to this machine image. Each filename is prefixed by a constant string denoting release and architecture information. The prefix, for example, may be 'maverick-server-cloudimg-amd64', in which case files will be named like maverick-server-cloudimg-amd64.img maverick-server-cloudimg-amd64-vmlinuz-virtual

All or some of the following files may be present in the archive:

  • .img This file is an partition image. It can be bundled, uploaded and registered to EC2, Eucalyptus or OpenStack as a Amazon Machine Image (ami/emi).

  • -disk1.img This is a qcow2 compressed disk image. It can be uploaded to OpenStack or booted directly via kvm. You should probably uncompress the image (qemu-img convert) before use in non-testing environment.

  • -uefi1.img This is a qcow2 compressed disk image that has GPT partitioning and a UEFI bootloader. It is bootable via UEFI, BIOS/GPT and PVGRUB (with support for GPT partition tables. It is bootable in OpenStack or directly via kvm. You should probably uncompress the images (qemu-img convert) before using it in a non-testing environment.

  • -root.tar.gz This is a compressed tar file containing the contents of the root filesystem. Essentially, 'tar cpzf - /'.

  • -vmlinuz-virtual This is a Linux kernel. It can be bundled, uploaded, and registered UEC as an Amazon Kernel Image (aki/eki). The '-virtual' string represents the Ubuntu Linux package that this kernel came from. It could potentially be '-server' or another string.

  • -initrd-virtual This is a Linux initrd. It can be bundled, uploaded, and registered UEC as an Amazon Ramdisk Image (ari/eri). Not all images require an initrd, and thus this file may not be present. If it is not present, then the image should be registered without a ramdisk.

  • -loader This file is a multiboot compliant image capable of loading the guest image. On UEC installs where the host operating system is 10.10 or later (LP: #611144), this can registered as a kernel (eki). It provides function similar to the Amazon released feature "Enabling User Provided Kernels". When the loader is used to boot an instance, a kernel upgrade performed inside the instance will take affect on subsequent boots.

  • -floppy This file is a floppy disk image. It is not useful or relevant to running inside of EC2 or UEC. The purpose of this file is to allow booting the .img outside a cloud. To boot outside of a cloud environment (where a metadata service is not present), the following kvm command line can be used: kvm -boot a -fda -floppy -drive file=.img,if=virtio This is not necessary, and generally obsolete, if -disk1.img is available.

share|improve this answer

you can find the format of an image using:

# qemu-img info image_filename.

This will tell you if it is raw or qcow2 and what size it is.

share|improve this answer
    
How can I install it? –  Lucio Jan 11 '14 at 21:46
    
OK, but I assume this is possible only once the image is downloaded. This is useful, but I was asking more about the documentation for the 12 or so images that are listed on the UEC site. I don't really want to download them all and reverse-engineer the information about them :) –  kermit666 Jan 11 '14 at 22:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.