EC2Kernel
|
Size: 3139
Comment:
|
Size: 6111
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 5: | Line 5: |
| The EC2 kernel is a topic branch of the Ubuntu kernel with Xen Dom0 patch set applied. | == About EC2 == EC2 is [[http://aws.amazon.com/|Amazon's cloud service]], based on a Xen dom0 compute environment. spot instances - a cheaper way to run AMIs if you don't want to run them immediately AMI - An operating system image, (has a default AKI, ARI). AKI - A registered kernel image, only select partners can register new AKIs ARI - A registered ram disk, only select partners can register new ARIs === About AMIs === AMIs are like iso images that are booted to bring up a virtual machine in the cloud. They can be remixed to create new AMIs (several people take the base Ubuntu AMI and modify it. There are two basic types of AMIs * instance store images - no permanent storage. * ebs (elastic block storage) - an AMI that is backed by Amazon's ebs so that it can be persistent, shutdown/rebooted as long as the virtual machine is not terminated. === Booting AMIs === When booting an AMI Xen Dom0 acts as the boot loader, so the kernel (AKI) and ramdisk (ARI) are specified separate from the actual operating system (AMI). Each AMI has a default AKI and ARI that is specified when the AMI is registered. An AMI can be booted with a different kernel by specifying the AKI to use at boot. pv-grub - first supported on maverick images. The default AKI, ARI for these images are provided by Amazon, which boots a pv-grub environment that looks at the AMI disk to find the real kernel, which is the loaded and booted via kexec. In Maverick both instance store and ebs backed AMIs are setup to use pv-grub. * To test new kernels pre-Maverick you must bundle, upload and register the kernel before it can be tested. * On Maverick (pv-grub) using an ebs backed AMI you can start an instance, install a kernel and reboot it as you would a regular kernel. Once done testing this way you should do a regular bundle and upload to ensure the kernel can work as a default AKI. * pv-grub does not allow console interactions so it boots the default kernel. There is a way to specify a fall back kernel if the default kernel fails. However if the default kernel boots part way then dies the fallback will not be executed. == About the EC2 kernels == Amazons services make use of both pv-ops and HVM + pv-on-hvm driver kernels. The HVM kernels are used by the Cluster Compute cloud while, pv-ops is used by the regular cloud. There are two different types of Ubuntu pv-ops kernels. Hardy - Lucid are based on the full Xen patchset, while Maverick is based on a patched regular pv-ops kernel. * EC2 kernels will not work if they are built as bzimages. This is because the Hypervisor that is used to load the kernel does not support bzimage. |
| Line 13: | Line 48: |
| * [[http://aws.amazon.com/|Amazon Web Services]] | |
| Line 53: | Line 88: |
| * 8.04 (Hardy) - see below * 8.10 (Intrepid) - see below * 9.04 (Jaunty) - no EC2 kernel * 9.10 (Karmic) - Xen patchset in ec2 topic branch * 10.04 LTS (Lucid) - Xen patchset in ec2 topic branch * 10.10 (Maverick) - paravirt-ops (pv-ops) in the -virtual kernel |
|
| Line 61: | Line 103: |
| === Jaunty === There is no EC2 compatible kernel for Jaunty. === Karmic === The Karmic kernel is the first kernel that matches the description above. |
The intrepid kernel for EC2 is based on the Hardy kernel patch carried forward to intrepid. |
| Line 68: | Line 106: |
| no - notes at this time | Does not require a ram disk to boot. === Maverick === Both instance store and ebs backed images use pv-grub to boot by default. |
About EC2
EC2 is Amazon's cloud service, based on a Xen dom0 compute environment.
spot instances - a cheaper way to run AMIs if you don't want to run them immediately
AMI - An operating system image, (has a default AKI, ARI). AKI - A registered kernel image, only select partners can register new AKIs ARI - A registered ram disk, only select partners can register new ARIs
About AMIs
AMIs are like iso images that are booted to bring up a virtual machine in the cloud. They can be remixed to create new AMIs (several people take the base Ubuntu AMI and modify it.
There are two basic types of AMIs * instance store images - no permanent storage. * ebs (elastic block storage) - an AMI that is backed by Amazon's ebs so that it can be persistent, shutdown/rebooted as long as the virtual machine is not terminated.
Booting AMIs
When booting an AMI Xen Dom0 acts as the boot loader, so the kernel (AKI) and ramdisk (ARI) are specified separate from the actual operating system (AMI). Each AMI has a default AKI and ARI that is specified when the AMI is registered. An AMI can be booted with a different kernel by specifying the AKI to use at boot.
pv-grub - first supported on maverick images. The default AKI, ARI for these images are provided by Amazon, which boots a pv-grub environment that looks at the AMI disk to find the real kernel, which is the loaded and booted via kexec. In Maverick both instance store and ebs backed AMIs are setup to use pv-grub.
* To test new kernels pre-Maverick you must bundle, upload and register the kernel before it can be tested. * On Maverick (pv-grub) using an ebs backed AMI you can start an instance, install a kernel and reboot it as you would a regular kernel. Once done testing this way you should do a regular bundle and upload to ensure the kernel can work as a default AKI. * pv-grub does not allow console interactions so it boots the default kernel. There is a way to specify a fall back kernel if the default kernel fails. However if the default kernel boots part way then dies the fallback will not be executed.
About the EC2 kernels
Amazons services make use of both pv-ops and HVM + pv-on-hvm driver kernels. The HVM kernels are used by the Cluster Compute cloud while, pv-ops is used by the regular cloud.
There are two different types of Ubuntu pv-ops kernels. Hardy - Lucid are based on the full Xen patchset, while Maverick is based on a patched regular pv-ops kernel.
* EC2 kernels will not work if they are built as bzimages. This is because the Hypervisor that is used to load the kernel does not support bzimage.
Useful links
Working with the EC2 topic branch
Getting the EC2 topic branch
Get a copy of the Ubuntu kernel git tree.
- git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
Checkout the ec2 branch
- git checkout --track origin/ec2 -b ec2
The branch will have a debian.ec2 directory which is used for building the kernel.
Building the EC2 kernel
The EC2 kernel is built using the same infrastructure as the standard Ubuntu kernel except the ec2 name is used.
- fdr binary-ec2
Uploading a test kernel
- Install the kernel to test on a test machine or into a chroot environment, to gain access to the kernel image and initrd.
Bundle and upload the kernel and initrd that was installed.
Getting the Xen patchset
The ec2 topic branch is based on the xen patchset that SuSE is using. It is currently pulled directly from the SuSE kernel of the day.
Visit http://ftp.suse.com/pub/projects/kernel/kotd/HEAD/src/
Download the kernel-source-<version>.src.rpm file where <version> is a kernel version string
- eg. kernel-source-2.6.32.3-0.0.44.81788a2.src.rpm
- unpack the rpm
- mkdir tmp cd tmp
rpm2cpio <kernel-source-<version>.src.rpm | cpio -idmv --no-absolute-filenames
- mkdir tmp cd tmp
- unpack patches.xen.tar.bz2
- tar -xvjf patches.xen.tar.bz2
- compare the unpacked xen patches to the patches in the ec2 git tree in debian.ec2/patches/
- For released kernels any update will need to be done as new patches to the EC2 tree. For development kernels update the corresponding git commit with a rebase.
- update the debian.ec2/patches dir to ensure it is kept up to date, so base patches are maintained.
Kernel Release Notes
Release specific information for Ubuntu EC2 kernels
* 8.04 (Hardy) - see below * 8.10 (Intrepid) - see below * 9.04 (Jaunty) - no EC2 kernel * 9.10 (Karmic) - Xen patchset in ec2 topic branch * 10.04 LTS (Lucid) - Xen patchset in ec2 topic branch * 10.10 (Maverick) - paravirt-ops (pv-ops) in the -virtual kernel
Hardy
The hardy kernel is not maintained as described above. The EC2 kernel for Hardy is the Xen Dom0 kernel that is handled as a custom binary.
The Xen patchset for the Hardy kernel is obtained as described above for the topic branch EC2 kernels.
Intrepid
The intrepid kernel for EC2 is based on the Hardy kernel patch carried forward to intrepid.
Lucid
Does not require a ram disk to boot.
Maverick
Both instance store and ebs backed images use pv-grub to boot by default.
KernalTeam/EC2Kernel (last edited 2010-11-24 20:19:14 by p5B2E4052)


