X

Break New Ground

Working with Oracle Cloud Infrastructure custom compute images

Prasenjit Sarkar
Senior Principal Product Manager

Oracle Cloud Infrastructure (OCI) uses images to create compute instances. You specify which image to use when you create an instance.

You can also create a custom image of a bare metal instance’s boot disk and use that image to create other instances. These instances include the customizations, configuration, and software that was installed when you created the image. Custom images do not include data from any block volumes that are attached to the original instance. Use cases for custom image would be:

  1. Creating a golden base image to spin instances from

  2. Backing up the base OS image in case of Disaster

  3. Cross Tenancy Base Image migration

  4. Cross Region Base Image migration

Figure 1: OCI custom images provide consistency

 

Limitations and considerations

Custom images have some limitations that you should consider before you create one:

  • Certain IP addresses are reserved for OCI use and can’t be used in your address numbering scheme.
  • Before you create a custom image of an instance, you must disconnect all iSCSI attachments and remove all iscsid node configurations from the instance.
  • When you create an image of a running instance, the instance shuts down and remains unavailable for several minutes. The instance restarts when the process completes.
  • You can’t create more than one custom image of a single instance at a time. When you start to create a custom image, the system implements a 20-minute timeout during which you can’t create another image of the same instance. You can, however, create images of different instances at the same time.
  • Custom images are available to all users who are authorized for the compartment in which the image was created.
  • Custom images inherit the compatible shapes that are set by default from the base image.
  • You can import a custom image with a maximum size of 400 GB.
  • The export a custom image with a maximum size of 400 GB.
  • You can’t create an image of an Oracle Database instance.
  • If you use a custom image and update the OS kernel on your instance, you must also upload the update to the network drive.

 

Oracle Server X5, X6, and X7 compatibility for custom images

Oracle Server X5, X6, and X7 have different host hardware. As a result, using an X5 or X6 image on an X7 bare metal or virtual machine (VM) instance might not work without modifications. We recommend that you use the Oracle-provided images for X7 hosts.

If you try to use an existing X5 image on X7 hardware, note the following compatibility:

  • CentOS 6 and all Windows versions are not cross-compatible.
  • Oracle Autonomous Linux 7 and Oracle Linux 8 are cross-compatible.
  • Oracle Linux 6, Oracle Linux 7, Ubuntu 16.04, and CentOS 7 are cross-compatible. However, you must update the kernel to the most recent version to install the latest device drivers. Run the following commands from a terminal session:
    • Oracle Linux
      • yum update
    • CentOS 7
      • yum update
    • Ubuntu 16.04
      • apt-get-update
      • apt-get dist-upgrade

If you try to use an X6 image on non-X6 hardware, note the following compatibility:

  • Oracle Linux 6, all CentOS versions, and all Windows versions are not cross-compatible.
  • Oracle Autonomous Linux 7 and Oracle Linux 8 are cross-compatible.
  • Oracle Linux 7, Ubuntu 18.04, and Ubuntu 16.04 are cross-compatible. Use the Oracle-provided images for X6.

The primary device drivers that are different among X5, X6, and X7 hosts are as follows:

  • Network device drivers
  • NVMe drive device drivers
  • GPU device drivers

More updates might be required depending on how you customize the image.

Create a custom image

Let’s create a custom image in the OCI.

  1. Sign in to the OCI Console.
  2. Open the navigation menu, go to Compute, and click Instances.
  3. Click the instance that you want to use as the basis for the custom image.
  4. Click More Actions, and then click Create Custom Image.

Figure 2: Create a custom image from an instance

  1. In the Create in Compartment list, select the compartment to create the custom image in.
  2. Enter a name for the image. You can change the name later, if needed. You can’t use the name of an Oracle-provided image for a custom image.
  3. Click Create Custom Image.
  4. To track the progress of the operation, you can monitor the associated work request from the image’s details page.

 

Edit the compatible shapes for a custom image

After an image is created, you can change the compute shapes that are compatible with it. One would want to change it to meet the performance requirements, such as, vertical scaling of the instance.

  1. Open the navigation menu, go to Compute, and click Custom Images.
  2. Click the custom image that you want to edit. The image details page lists compatible shapes associated with the image.

    Figure 3: Shapes compatible with a custom image
     
  3. Click Edit Details and add or remove compatible shapes. You can also configure the minimum and maximum number of OCPUs that users can select when they use this image with a flexible shape. Click the down arrow in the row for the shape, and then enter the minimum and maximum OCPU counts.


    Figure 4: Edit custom image shape compatibility
     
  4. Click Save Changes.

Note: After you add a compatible shape to an image, test the image on the shape to ensure that the image works on the shape. Some images (especially Windows) might never be compatible with other shapes because of driver or hardware differences.

 

Launch an instance from a custom image

Now that you have a custom image, let’s create an instance from it.

  1. Open the navigation menu, go to Compute, and then click Custom Images.
  2. Click the custom image that you created.
  3. Click Create Instance.
  4. Specify other options as described in the Creating a Linux Instance topic or the Creating a Windows Instance topic in the documentation.

 

Conclusion

This blog post provides an overview of how you can create custom compute images in Oracle Cloud Infrastructure. Custom compute images enable you to maintain a custom operating system image of your choice that includes all the required configuration and tools that need to be installed within it.

 

Resources

Every use case is different. The only way to know if Oracle Cloud Infrastructure is right for you is to try it. You can select either the Oracle Cloud Free Tier or a 30-day free trial, which includes US$300 in credit to get you started with a range of services, including compute, storage, and networking.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.