no ideal way to boot an ubuntu cloud-image on openstack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Fix Released
|
High
|
Unassigned |
Bug Description
The current path for "upload an Ubuntu image" for nova goes something like this:
$ cloud-publish-
alternatively
$ cloud-publish-image \
--kernel-file oneiric-
i386 oneiric-
The problem with either of these is that they result in libvirt/nova invoking kvm to load the kernel as '--kernel'. When that is done, kvm will then re-load the kernel on instance reboot. The result is that inside an instance 'apt-get dist-upgrade' that pulls in a kernel package has no effect after reboot.
We have addressed this shortcoming on Eucalyptus and on EC2.
a. On Eucalyptus, under bug 611144, I added support for loading a "loader" rather than a kernel. We exposed this functionality in cloud-publish-
b. On eucalyptus we've also made available a "loader" kernel and ramdisk, which do nothing more than boot, mount the root filesystem and the kexec into the real kernel. (https:/
c. On EC2 we're using 'pv-grub' as the loader, and grub-legacy-ec2 to load the kernel.
Both of those mean that after 'apt-get dist-upgrade && reboot' the user will boot into a new kernel.
On nova, our options at the moment would appear to be:
1. re-use the kexec-loader as described in 'b' above.
This would work, but the kexec-loader is less "complete" a loader compared to grub. It has only very limited support for parsing a grub.cfg file to find the kernel to load.
2. create new full-disk images for nova (with a partition table and grub-pc installed in the MBR)
This means carrying yet another deliverable in cloud-images. The most user friendly format would be compressed raw image. These images would then not be suitable (without modification to tools) as a replacement for the existing partition images, as they then could not be directly uploaded to EC2 or Eucalyptus.
3. suggest use of vmdk files that we're currently producing. (currently broken at bug 826798).
The issue with vmdk format is it is not linux friendly. You *can* convert the sparse compressed images from vmdk to "raw" using virtual box tools, but you cannot do so with qemu-img. In general, they're less immediately useful format.
Some updates.
* The latest builds [3] (20110829) have a .qcow2 file which is a compressed qcow disk image.
* I posted an email to 2 ubuntu-cloud [1] and ec2ubuntu [2] asking if anyone is using the .vmdk files. I'm thinking of replacing them with compressed qcow images.
The compressed qcow images do work with: server- cloudimg- amd64-disk1. qcow2 $BUCKET -v --type image
uec-publish-image amd64 oneiric-
However, they're still less than ideal. It seems that nova is not resizing the disk image up as it does with a partition image (bug 836759).
-- /lists. ubuntu. com/archives/ ubuntu- cloud/2011- August/ thread. html#655 /groups. google. com/group/ ec2ubuntu/ browse_ frm/thread/ 69d7a94e32642b1 b /cloud- images. ubuntu. com/server/ oneiric/ current/
[1] https:/
[2] https:/
[3] https:/