Reputation:
According to my limited understanding, AWS EC2 uses Xen as the foundation technology, and Xen virtual machine loads the EC2's AMI kernel to boot up the instance.
So in the EC2 instance I upgrade the kernel version (for example, from 3.10 to 3.14), then reboot and use uname -a
to confirm that new kernel (3.14) is running.
Despite that kernel upgrade has already happened, the EC2 instance is still associated with the original AMI with the lower kernel version.
My questions are:
Upvotes: 5
Views: 5067
Reputation: 61551
Does EC2's Xen foundation use the new kernel to boot up the instance?
No, it doesn't. It boots us the kernel associated with the instance i.e. aki-xxxxxxxx. It basically disregards anything that may be in your /boot directory on your root volume. This behavior is not very different from saying having your kernel image on a separate partition and have your kernel boot up always from that partition. (I do it when I boot Ubuntu on my Chromebook for example)
Without manipulating the instance's AMI, is it possible to use new kernel features (such as new system calls) offered by the upgrade?
No. Once your kernel boots up with the aki-xxxxxxxx kernel it can use that kernel's features and system calls. Although most of the features and system call will be available since a specific aki-xxxxxxxx kernel needs to be compatible with your particular instance. So say for Ubuntu 12.04 LTS you probably want to use a kernel 3.2 or later as a 2.6 kernel will not work.
Also, this also means that when choosing aki-xxxxxxxx kernels you need to be careful that you choose one that is compatible with your particular OS.
If you want to use your own kernels, you should look at PV-GRUB: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html
Upvotes: 2
Reputation: 23502
This may partially answer your question. While creating an Instance, you can chose the kernel ID as below:
If you do not chose a different kernel, it will pick up the default kernel id indicated by Use default
in above screenshot.
Upvotes: 2