investigate "full disk" images on EC2 for non-hvm instance types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Hey,
Currently in EC2, we register 3 types of images:
* hvm
* ebs
* instance-store
The hvm boot volumes have a bootloader installed and are "full disk images".
The instance-store and ebs are partitionless disks.
The thought of doing this came into my mind when someone asked me how they could take their images out of EC2 and to openstack. Doing that would have 2 trickier pieces:
* ebs or instance volume types would have no MBR and openstack images more commonly would have an MBR.
* user woudl have to get the image out of openstack.
The benefits of doing it would be:
* less differences between openstack and ec2
* remove need to create (and publish) the "uec tarball" images.
* potentially a happier grub-pc
some things that play in this area to make things work and might have to be changed/updated are:
* grub-legacy-ec2
* cloud-init (cloudinit/
* ec2-automated-
* initramfs/kernel
I tried doing this with the following general steps:
* start with a volume created from an hvm snapshot of 12.04
* modify /boot/grub/menu.lst in the image to say '(hd0,0)' rather than (hd0) (otherwise it can't find the kernel)
* snapshot it (SNAP-A)
* register that snapshot and boot it
It seems there are some variables at play here, and i'm not sure i found the right values. when you register an instance, you can specify '--root-
Changed in ubuntu: | |
assignee: | nobody → Ben Howard (utlemming) |
status: | New → Confirmed |
affects: | ubuntu → uec-live-build |
Changed in uec-live-build: | |
assignee: | Ben Howard (utlemming) → nobody |
affects: | uec-live-build → cloud-images |
Changed in cloud-images: | |
status: | Confirmed → Won't Fix |
OK. so i did successfully get a hvm snapshot to boot as a non-hvm ebs root. snap-3f020d61 --name "smtest- hvm-to- ebs6" --kernel= aki-b4aa75dd --arch=x86_64 --root- device- name=/dev/ xvda
* get a volume of hvm snapshot
* modify /boot/grub/menu.lst entries to:
- root (hd0)
+ root (hd0,0)
* snapshot volume
* register instance
euca-register --snapshot=
$ xc2 describe-images aki-b4aa75dd ami-2fc5b446 smtest- hvm-to- ebs6 950047163771 available private x86_64 machine aki-b4aa75dd ebs paravirtual xen pv-grub- hd00_1. 03-x86_ 64.gz amazon available public x86_64 kernel instance-store paravirtual xen
IMAGE ami-2fc5b446 950047163771/
BLOCKDEVICEMAPPING EBS /dev/xvda snap-3f020d61 8 true standard
IMAGE aki-b4aa75dd amazon/
Inside the instance:
$ cat /proc/partitions
major minor #blocks name
202 0 8388608 xvda cloudimg- rootfs ro console=hvc0
202 1 8377897 xvda1
$ cat /proc/cmdline
root=LABEL=
$ grep "debconf" /var/log/ cloud-init. log dpkg.py[ DEBUG]: setting grub debconf- set-selections with '/dev/sda','false'
2013-06-20 14:39:53,015 - cc_grub_
I was then able to 'dpkg-reconfigure grub-pc' and select 'xvda' as the thing to install to, and aso dpkg-reconfigure grub-legacy-ec2 and accept my changes.