Using Oracle VM with Amazon EC2

Posted in: Technical Track

If you’re planning on running Oracle VM with Amazon EC2, there are some important limitations you should know about.

As part of my work getting the Oracle Linux Unbreakable Enterprise Kernel 2 working (yeah that’s a mouthful), I tried using the Oracle-supplied Oracle Linux 6 AMI images that are listed as community AMIs by Amazon:

[[email protected] ~]$ ec2-describe-images -a --filter "name=*Oracle Linux 6*"
IMAGE   ami-87a076ee    936851542197/Oracle Linux 6.1 x86_64 - OVM      936851542197    available       public          x86_64  machine aki-4e7d9527ebs      paravirtual     <b>ovm</b>
BLOCKDEVICEMAPPING      /dev/sda                snap-ea95e18e   20

The “OVM” part here is interesting. Amazon EC2 is typically set up on their own version of Xen, but this image uses a different, though similarly Xen-based, hypervisor: Oracle VM. This appears to be a result of the Oracle-Amazon partnership so touted by Larry Ellison in his OpenWorld 2010 keynote.

The AMI itself launched as expected (once I had set the instance type to large; it would seem we need the 7.5G of RAM the large instance provides!) But after the initial install, I was completely unable to use any kernel other than the 2.6.32-100.34.1.el6uek.x86_64 kernel originally supplied.

Every time the instance would be listed as running but unreachable with the console log showing a variation of

"main" "root=/dev/sda1" "ro" "4"
vbd 2049 is hd0
******************* BLKFRONT for device/vbd/2049 **********
backend at /local/domain/0/backend/vbd/313/2049
Failed to read /local/domain/0/backend/vbd/313/2049/feature-barrier.
Failed to read /local/domain/0/backend/vbd/313/2049/feature-flush-cache.
41943040 sectors of 512 bytes

Since it’s impossible to specify a –kernel alternate kernel option with Oracle VM hosts, I can’t explicitly attach a different kernel. And the ec2-register command used to create AMI images does not have the option to create an image with the Oracle VM hypervisor at all. This Amazon FAQ document gives a clue:

Q: Can customers import Oracle Virtual Machine templates into AmazonEC2?

Oracle will distribute templates of Oracle Applications that have been produced by Oracle and approved by AWS. Customers will be able to customize these environments and save them as derivative images which also run on the Oracle Virtual Machine.

So it’s possible to customize pre-made templates, but the ability to create new templates is conspicuously not mentioned. And indeed, it’s possible to create a derivative image using ec2-create-image that still has an OVM hypervisor, but there’s no mechanism to use a custom kernel with this command.

So the take-away here seems to be:

  • It’s possible to create Oracle VM-based Amazon EC2 instances, but only from Oracle-created AMIs.
  • There’s no mechanism to use kernels other than those bundled with the image, so there’s no prospect of applying security updates unless Oracle releases a new AMI.
  • Fortunately, I was able to get the Oracle Linux UEK2 kernel working with Amazon’s ordinary Xen hypervisor, though there’s no pre-built AMI for it. I made a separate blog post about this.

For you readers: Have any of you managed to get a successful Oracle VM-based Amazon EC2 instance working? How do you deal with the issue of kernel updates?



Want to talk with an expert? Schedule a call with our team to get the conversation started.

About the Author

Marc is a passionate and creative problem solver, drawing on deep understanding of the full enterprise application stack to identify the root cause of problems and to deploy sustainable solutions. Marc has a strong background in performance tuning and high availability, developing many of the tools and processes used to monitor and manage critical production databases at Pythian. He is proud to be the very first DataStax Platinum Certified Administrator for Apache Cassandra.

4 Comments. Leave new

Hi Marc,
I haven’t tried using Amazon EC2 to install the OL UEK2 kernel yet but I find it quite interesting. I’ve used the public AMI’s to create database instances just to see how it works. However, I’ve been doing beta testing using HP Cloud which uses the OpenStack framework. Since it’s only in beta the number of images provided are somewhat limited but I did attempt to install UEK on the CentOS 5.4 image that they provided. That didn’t work either since it just defaults to the image supplied ramdisk/kernel. I’ll try the CentOS 6.2 image and see if that will work either.


Testing out Oracle’s Unbreakable Enterprise Kernel 2 | The Pythian Blog
March 28, 2012 7:58 pm

[…] some blind allies getting the Oracle Linux UEK2 kernel working with Amazon EC2 and Oracle VM I found that I could make it work without Oracle VM, with with Amazon’s default Xen […]

Trevor North
July 5, 2014 2:37 pm

Any updates on using Oracle VM instead of AWS Xen for your own images ? We are looking at this but understand from the Oracle Press Release in 2010 that Oracle support would only consider the stack supported in AWS if it was using Oracle VM. Problem is, Oracle dont seem to have updated the images for a long time and the versions that Oracle provide as BYOL for the database arent the certified versions for the applications we want to install.

After launching our OEL6.5 EC2 instance and viewing the syslog with Get Syslog in the console , does the following indicate that it is using the Oracle VM rather than the AWS one ?

GNU GRUB version 0.97 (7864320K lower / 0K upper memory)

Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, ‘e’ to edit the
commands before booting, or ‘c’ for a command-line.  Oracle Linux Server Red Hat Compatible Kernel (2.6.32-431.20.3.el6.x8>  Oracle Linux Server (3.8.13-35.1.2.el6uek.x86_64)  Oracle Linux Server (3.8.13-26.2.1.el6uek.x86_64)  Oracle Linux Server Red Hat Compatible Kernel (2.6.32-431.5.1.el6.x86>  Oracle Linux Server (3.8.13-16.2.2.el6uek.x86_64)  Oracle Linux Server Red Hat Compatible Kernel (2.6.32-431.el6.x86_64)  The highlighted entry will be booted automatically in 5 seconds.  The highlighted entry will be booted automatically in 4 seconds.  The highlighted entry will be booted automatically in 3 seconds.  The highlighted entry will be booted automatically in 2 seconds.  The highlighted entry will be booted automatically in 1 seconds.  Booting ‘Oracle Linux Server (3.8.13-35.1.2.el6uek.x86_64)’

root (hd0)
Filesystem type is ext2fs, using whole disk
kernel /boot/vmlinuz-3.8.13-35.1.2.el6uek.x86_64 ro root=/dev/xvda1 SYSFONT=lat
arcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us numa=off transparent_hugepage=never
initrd /boot/initramfs-3.8.13-35.1.2.el6uek.x86_64.img

Marc Fielding
July 7, 2014 12:42 pm

Hi Trevor,

The most current statement from Oracle on AWS support I could find was at

“Oracle fully supports deploying Oracle Database, Oracle Fusion Middleware, Enterprise Manager and Oracle Linux on the portion of Amazon EC2 which uses Amazon’s Xen virtualization technology. However, it may be noted that Amazon EC2 is a virtualized environment and uses a virtualization engine that is not supported by Oracle. Users will therefore be directed to Amazon for any virtualization-related issues.”

Since Oracle VM and Amazon’s native Xen stacks are so similar, I can’t determine which hypervisor you’re using by the boot messages. You can find out by using ec2-describe-images or ec2-describe-instances in the EC2 CLI tools though; there’s an example at the beginning of this blog post.




Leave a Reply

Your email address will not be published. Required fields are marked *