Oracle Compute Cloud - Uploading My Image - Part Two - Linux 7 2017 07 17 18 46 08 Oracle Compute Cloud Service Instance Details Screen Captures

Oracle Compute Cloud – Uploading My Image – Part Two – Linux 7

In this sequel of part one I will show how you can upload your own (Oracle) Linux 7 image in the IAAS Cloud of Oracle. This post will use the lessons learnt by using AWS which I described here.

The tools used are: VirtualBox, Oracle Linux 7, Oracle IAAS Documentation and lots of time.

With Oracle as Cloud provider it is possible to use the UEKR3 or UEKR4 kernels in your image that you prepare in VirtualBox. There is no need to temporarily disable the UEKR3 or UEKR4 repo’s in your installation. I reused the VirtualBox VM that I’d prepared for the previous blog: AWS – Build your own Oracle Linux 7 AMI in the Cloud.

The details:

The main part here is (again) making sure that the XEN blockfront en netfront drivers are installed in your initramfs. There are multiple ways of doing so. I prefer changing dracut.conf.

 # additional kernel modules to the default
 add_drivers+="xen-blkfront xen-netfront"

You could also use:

rpm -qa kernel | sed 's/^kernel-//'  | xargs -I {} dracut -f --add-drivers 'xen-blkfront xen-netfront' /boot/initramfs-{}.img {}

But it is easy to forget to check if you need to rebuild your initramfs after you have done a: “yum update”. I know, I have been there…

The nice part of the Oracle tutorial is that you can minimize the size you need to upload by using sparse copy etc. But on Windows or in Cygwin that doesn’t work. Nor on my iMac. Therefore I had to jump through some hoops by using an other VirtualBox Linux VM that could access the image file and make a sparse copy, create a tar file and copy it back to the host OS (Windows or OSX).

Then use the upload feature of Oracle Compute Cloud or Oracle Storage Cloud to be exact.

Tip: If you get errors that your password isn’t correct (like I did) you might not have set a replication policy. (See the Note at step 7 in the documentation link).

Now you can associate your image file, which you just uploaded, to an image. Use a Name and Description that you like:

2017-07-14 17_54_30-Oracle Compute Cloud Service - Images

Then Press “Ok” to have the image created, and you will see messages similar to these on your screen:

2017-07-14 17_54_40

2017-07-14 17_54_45-Oracle Compute Cloud Service - Images

I now have two images created in IAAS. One exactly the same as my AWS image source and one with a small but important change:

2017-07-14 17_55_16-Oracle Compute Cloud Service - Images

Now create an instance with the recently uploaded image:

2017-07-14 17_55_37-Oracle Compute Cloud Service - Images

2017-07-14 17_56_34-Oracle Compute Cloud Service - Instance Creation

Choose the shape that you need:

2017-07-14 17_56_45-Oracle Compute Cloud Service - Instance Creation

Do not forget to associate your SSH Keys with the instance or you will not be able to logon to the instance:

2017-07-14 17_58_18-Oracle Compute Cloud Service - Instance Creation

I left the Network details default:
2017-07-14 18_01_33-Oracle Compute Cloud Service - Instance Creation

To change the storage details of the boot disk press the “hamburger menu” on the right (Just below “Boot Drive”):

2017-07-14 18_02_12-Oracle Compute Cloud Service - Instance Creation

I changed the boot disk from 11GB to 20GB so I can expand the filesystems if needed later on:

2017-07-14 18_03_21-Oracle Compute Cloud Service - Instance Creation

Review your input in the next step and press “Create” when you are satisfied:

2017-07-14 18_04_16-Oracle Compute Cloud Service - Instance Creation

You will see some messages passing by with the details of steps that have been put in motion:

2017-07-14 18_04_27-Oracle Compute Cloud Service - Instances (Instances)

If it all goes too fast you can press the little clock on the right side of you screen to get the ”Operations History”:

2017-07-14 18_04_35-Oracle Compute Cloud Service - Instances (Instances)

On the “Orchestrations” tab you can follow the status of the instance creation steps:

2017-07-14 18_06_45-Oracle Compute Cloud Service - Orchestrations

Once they have the status ready you will find a running instance on the instances tab:

2017-07-14 18_09_21-Oracle Compute Cloud Service - Instances (Instances)

Then you can connect to the instance and do with it whatever you want. In the GUI you can use the “hamburger” menu on the right to view the details of the instance, and for instance stop it:

2017-07-14 18_14_22-Oracle Compute Cloud Service - Instance Details (Overview)

Sometimes I got the error below, but found that waiting a few minutes before repeating the action it sequentially succeeded:

2017-07-17 18_01_32-

A nice feature of the Oracle Cloud is that you can capture screenshots of the console output, just as if you were looking at a monitor:

2017-07-17 18_46_08-Oracle Compute Cloud Service - Instance Details (Screen Captures)

And to view the Console Log (albeit truncated to a certain size) if you added the highlighted text to GRUB_CMDLINE_LINUX in /etc/default/grub:

[ec2-user@d3c0d7 ~]$ cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet net.ifnames=0 console=ttyS0"
GRUB_DISABLE_RECOVERY="true"

If you didn’t you will probably see something like:

2017-07-17 18_46_28-Oracle Compute Cloud Service - Instance Details (Logs)

If you did you will see something like:

2017-07-17 19_01_38-Oracle Compute Cloud Service - Instance Details (Logs)

I hope this helps building your own Linux 7 Cloud Images.

4 Comments

  1. Chris Christensen October 26, 2017
    • Chris Christensen October 26, 2017
      • Patrick Roozen October 27, 2017
        • Chris Christensen October 27, 2017