Forum Stats

  • 3,742,003 Users
  • 2,248,517 Discussions
  • 7,862,102 Comments

Discussions

Launch an Oracle Linux Instance in AWS

Honglin Su-Oracle
Honglin Su-Oracle Posts: 72 Employee
edited Jul 8, 2021 8:11PM 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] authenticity of host '54.215.188.93 (54.215.188.93)' can't be established.ECDSA key fingerprint is SHA256:Ayc0K0CSmuAA3EoCicn3Fa3m7lN+iTipVGbxie7rfMg.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '54.215.188.93' (ECDSA) to the list of known hosts.[[email protected] ~]$ cat /etc/oracle-releaseOracle Linux Server release 7.5

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:

Comments

  • JohnWatson2
    JohnWatson2 Member Posts: 4,268 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,268 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,621 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: 67 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,268 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?

  • User_2CFFP
    User_2CFFP Member Posts: 2 Green Ribbon
    edited Aug 2, 2021 5:22AM

    Hi, everyone!

    I faced of the following issue when using the Oracle Linux 8.3/8.4 in AWS.

    When I attach additional Elastic IP(s) to the instance, through second ENI or just secondary Private IP, then I can't to connect to that instance via Secondary IP.

    From the instance I see both interfaces.

    [email protected] ~ # ethtool -i ens6

    driver: ena

    version: 2.1.0K

    firmware-version:

    expansion-rom-version:

    bus-info: 0000:00:06.0

    supports-statistics: yes

    supports-test: no

    supports-eeprom-access: no

    supports-register-dump: no

    supports-priv-flags: no

    [email protected] ~ # ethtool -i ens5

    driver: ena

    version: 2.1.0K

    firmware-version:

    expansion-rom-version:

    bus-info: 0000:00:05.0

    supports-statistics: yes

    supports-test: no

    supports-eeprom-access: no

    supports-register-dump: no

    supports-priv-flags: no


    Ethtool says that Link detected = yes

    SELinux is disabled. Firewall is configure properly, I think

    [email protected] ~ # firewall-cmd --list-all

    public (active)

     target: default

     icmp-block-inversion: no

     interfaces: ens5 ens6

     sources:

     services: dhcpv6 dhcpv6-client http https nfs ntp ssh zabbix-agent

     ports: 81/tcp 10080/tcp 1443/tcp

     protocols:

     masquerade: no

     forward-ports:

     source-ports:

     icmp-blocks:

     rich rules:


    I can ping out from the instance to the World

    [email protected] ~ # ping -I ens6 8.8.8.8

    PING 8.8.8.8 (8.8.8.8) from 10.10.1.198 ens6: 56(84) bytes of data.

    64 bytes from 8.8.8.8: icmp_seq=1 ttl=51 time=0.874 ms

    64 bytes from 8.8.8.8: icmp_seq=2 ttl=51 time=0.852 ms


    But I can't ping and connect to any Open port via EIP attached ti the second Private IP or Second Interfce.

    Any ideas?

    Many thanks

Sign In or Register to comment.