[ubuntu-cloud] trying to make a local-store AMI
Scott Moser
smoser at ubuntu.com
Thu Mar 10 14:37:42 UTC 2011
On Wed, 9 Mar 2011, David Stainton wrote:
> Hi,
>
> I'm trying to make a local store AMI from a running instance with
> ami-08f40561 (ubuntu-maverick-10.10-amd64); like this:
>
> ec2-bundle-vol --cert cert-KZR4IXA6BHN3A3PH3ONHLUP5VVSA2M7K.pem
> --privatekey pk-KZR4IXA6BHN3A3PH3ONHLUP5VVSA2M7K.pem -u xxxx-xxxx-xxxx
> ec2-upload-bundle -b my-ami-bucket -m image.manifest.xml -a
> AKIAJMHWTRQLX77IO5JA -s cd/MCdjCzJ/twnRqZgUnge/yY5sptB9T5PKSupX+
> ec2-register --name my-ami-bucket/my-server my-ami-bucket/image.manifest.xml
> ec2-run-instances ami-xxxxxxxx --key default --instance-type m1.large
If you have an older version of ec2-bundle-vol, or if you got it from a
location other than the ubuntu archive, then it is likely that you're
running into bug 672986 [1] or 667793 [2]. Until those bugs were fixed
(version 1.3.49953-0ubuntu1.1 in maverick), the kernel would fail to find
the root volume because it was specified with LABEL= or UUID= and those
items were not being copied.
[1] https://bugs.launchpad.net/ubuntu/+source/ec2-ami-tools/+bug/672986
[2] https://bugs.launchpad.net/ubuntu/+source/ec2-ami-tools/+bug/667793
You can get the ec2 ami tools from the ubuntu multiverse archive by:
- edit /etc/apt/sources.list and uncomment the 2 lines
deb http://archive.ubuntu.com/ubuntu/ maverick multiverse
deb http://archive.ubuntu.com/ubuntu/ maverick-updates multiverse
- sudo apt-get update
- sudo apt-get install ec2-api-tools ec2-ami-tools
Note the warning in the top of that file that the file is generated on
first instance boot, so your modifications will not survive a rebundle.
Also possible, but less likely, is that you are not specifying a kernel,
and one is not being "inherited" from the running instance (due to some
bug). If that were the case, you'd end up using some old fedora kernel
(2.6.18 or so) which would fail to find the root filesystem. If that is
the case, then in either the bundle stage or the register stage you will
need to specify a kernel to launch with. For current 10.04 images and
beyond you should specify a "pv-grub" kernel.
For us-east-1 (where ami-08f40561 is) you will want to use kernel
aki-427d952b (ec2-public-images/pv-grub-hd0-V1.01-x86_64.gz).
So, either:
ec2-bundle-vol --kernel aki-427d952b ...
or
ec2-register --kernel aki-427d952b ...
> This results in the ec2 instance booting up with kernel errors in the
> log; it cannot find the root fs...
Both of the issues above will result in this error.
More information about the Ubuntu-cloud
mailing list