Forum Stats

  • 3,770,515 Users
  • 2,253,129 Discussions
  • 7,875,493 Comments

Discussions

Launch an Oracle Linux Instance in AWS

Honglin Su-Oracle
Honglin Su-Oracle Posts: 75 Employee
edited Nov 30, 2021 8:23PM in Oracle Linux

For Amazon Web Services (AWS), Oracle offers support for Oracle Linux running on Amazon Elastic Compute Cloud (EC2) and Relational Database Service (RDS).  Customers can create their own Amazon Machine Images (AMIs) or they can obtain Oracle-provided Oracle Linux AMIs from Amazon EC2 console by searching for the owner ID 131827586825 and deploying the Oracle Linux images on Amazon EC2 and RDS.  Refer to the policy document Licensing Oracle Software in the Cloud Computing Environment for licensing and support pricing details.

This article explains the steps to locate the Oracle-provided Oracle Linux AMIs and launch an Oracle Linux instance using Amazon EC2 console.

Finding Oracle-Provided Oracle Linux AMIs

  • Visit the Amazon EC2 console at https://console.aws.amazon.com/ec2/.          
  • Choose AMIs from the left navigation panel and then select Public images.
  • Use filters to search for Oracle Linux images by choosing Owner and entering the owner ID 131827586825 to list the available Oracle Linux AMIs produced by Oracle. As of July 2021, Oracle has produced 41 Oracle Linux AMIs ranging from Oracle Linux 5.11 to the latest Oracle Linux 7.9 and 8.4.
  • Pick the specific Oracle Linux AMI you want to work with.        


Launching an Oracle Linux AMI from Amazon EC2 Console

It takes a few simple steps to launch an Oracle Linux AMI.

  • First log into Amazon EC2 Console and choose the option to "Launch a Virtual Machine" wizard inside the console.
  • From the left navigation panel, choose Community AMIs and then check the Other Linux option.
  • Type owner ID 131827586825 to locate the specific version of Oracle Linux to launch.

AWS-ChooseAMI-editedpng

  • Choose an instance type based on your business need.

AWS-InstanceTypepng

  • Customize the instance where appropriate. If you haven't created an Amazon key pair, you need to create a key pair in order to log into your instance.

AWS-keypairpng

  • Review and launch the instance. This example is using an Oracle Linux 7.5 AMI.

AWS-ReviewInstanceLaunchpng

  • Check the instance status and capture the VM details such as the public IP address which will be used to log into the VM.

AWS-InstanceStatus-editedpng

Connecting to the Oracle Linux Instance

Once the VM is running, you can connect to the Oracle Linux instance using an SSH client with the key pair created in the above steps.

$ ssh -i "OracleLinuxKeyPair.pem" [email protected]

Additional Resources

Oracle offers a broad portfolio of solutions for public and private clouds that give customers choice and flexibility deploying Oracle Linux in Oracle Cloud and other clouds. In the Oracle Cloud, Oracle Linux Premier Support is available at no additional charge with subscription to Oracle Cloud Infrastructure. This can be a substantial cost savings over use of other Linux products in Oracle Cloud. Visit Getting Started to use Oracle Linux for Oracle Cloud Infrastructure.

Visit the resources below to take advantage of Oracle Linux to help you build your cloud infrastructure:

«1

Comments

  • JohnWatson2
    JohnWatson2 Member Posts: 4,329 Silver Crown

    Creating a VM off the OL7.5-x86_64-HVM-2018-05-14 - ami-3485114b AMI is easy enough, but it fails when you reboot because the kernel is looking for /dev/sda3 which doesn't exist. We've been trying to reconfigure grub to use the partition's UUID but no luck so far.

    Any ideas? Thank youi for any insight.

    3815448
  • 3815448
    3815448 Member Posts: 1

    Creating a VM off the OL7.5-x86_64-HVM-2018-05-14 - ami-3485114b AMI is easy enough, but it fails when you reboot because the kernel is looking for /dev/sda3 which doesn't exist. We've been trying to reconfigure grub to use the partition's UUID but no luck so far.

    Any ideas? Thank youi for any insight.

    I ran into this exact issue yesterday as well.  After attaching the volume to another working EC2 instance, I updated the three "root=/dev/sda3" lines in /etc/grub2.cfg (which it says not to update, but I was having trouble running the grub auto-update which is supposed to regenerate this file) to instead be "root=UUID=<my_uuid>".

    You also have to update the /etc/fstab entry to be "UUID=<my_uuid>"

  • JohnWatson2
    JohnWatson2 Member Posts: 4,329 Silver Crown

    I ran into this exact issue yesterday as well.  After attaching the volume to another working EC2 instance, I updated the three "root=/dev/sda3" lines in /etc/grub2.cfg (which it says not to update, but I was having trouble running the grub auto-update which is supposed to regenerate this file) to instead be "root=UUID=<my_uuid>".

    You also have to update the /etc/fstab entry to be "UUID=<my_uuid>"

    Ah. Thanks for replying. Glad it wasn't just us.

    we tried a similar approach to you, but not by editing grub.cfg. We edited the /etc/default/grub file and changed the GRUB_CMDLINE_LINUX

    entry then re-generated grub.cfg from it. We also changed the fstab entry. We then got the missing device message about the UUID

    rather than the /dev/sda3 device

    Eventually we created a CentOS machine and converted it to OEL, which will do for now. There just aren't enough AMIs yet that can use the new T3 machines.

    It's a shame the creator of the image has not commented. Maybe they'll fix the issue and create a new one, they clearly didn't test it.

  • Sergio-Oracle
    Sergio-Oracle Member Posts: 2,622 Employee

    I've let the appropriate people know you encountered this issue.

  • Is there anyway to disable the yum update cloud-init runcmd script at boot in the AMI images?

  • Simon Coter-Oracle
    Simon Coter-Oracle Member Posts: 72 Employee

    Is there anyway to disable the yum update cloud-init runcmd script at boot in the AMI images?

    Is there any particular reason on why you do not want to get cloud-init updated ?

    I do not think it's possible to disable the execution on the first boot.

  • user2740849
    user2740849 Member Posts: 1
    edited Feb 20, 2020 2:53PM

    I see the latest image for OL7.7, but it does not support AWS ENI's nor provide the Volume device names like the Amazon Linux does, is this being worked on? It errors out when you try to restart network service.

  • JohnWatson2
    JohnWatson2 Member Posts: 4,329 Silver Crown

    I see the latest image for OL7.7, but it does not support AWS ENI's nor provide the Volume device names like the Amazon Linux does, is this being worked on? It errors out when you try to restart network service.

    You could try this one which is fine with ENI,

    https://aws.amazon.com/marketplace/pp/B07M5HHR6X?ref=cns_srchrow

    it needs a yum update to take it up to OL7.7

  • I see the latest image for OL7.7, but it does not support AWS ENI's nor provide the Volume device names like the Amazon Linux does, is this being worked on? It errors out when you try to restart network service.

    I would like to learn more about what you requested in terms of ENI support. Would you please let me know how I can talk with you? I can be reached at honglin.su AT oracle.com.

  • User_SBU2W
    User_SBU2W Member Posts: 1
    edited Dec 17, 2020 8:56AM

    Hi!

    I'm curious why Oracle Linux AMIs are not being advertised on AWS Marketplace. There are AMIs built by a couple of third party companies but it is not clear how those relate to Oracle and if it is reasonable or even safe to use their AMIs. I would rather not.

    Red Hat provides AMIs on AWS Marketplace. It doesn't apply any AWS-accounted software fees, their AMIs get registered with Red Hat's tools as if any dedicated server or on-premices VM. AFAIU it is OK for both Red Hat and for AWS.

    Why Oracle doesn't bother?