Managing Custom Images

Oracle Cloud Infrastructure uses images to launch instances. You specify an image to use when you launch an instance.

You can create a custom image of an instance's boot disk and use it to launch other instances. Instances you launch from your image include the customizations, configuration, and software installed when you created the image.

For details about Windows images, see Creating Windows Custom Images.

Custom images do not include the data from any attached block volumes. For information about backing up volumes, see Creating a Manual Backup for a Block Volume.

System Resilience

Follow industry-wide hardware failure best practices to ensure the resilience of your solution in the event of a hardware failure. Some best practices include:

  • Design your system with redundant compute nodes in different availability domains to support failover capability.
  • Create a custom image of your system drive each time you change the image.
  • Back up your data drives, or sync to spare drives, regularly.
If you experience a hardware failure and have followed these practices, you can terminate the failed instance, launch your custom image to create a new instance, and then apply the backup data.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be granted security access in a policy  by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don't have permission or are unauthorized, verify with your administrator what type of access you have and which compartment  to work in.

For administrators: The policy in Let image admins manage custom images includes the ability to create, delete, and manage custom images.

The policy in Let users launch compute instances includes the ability to create an instance using any custom image. The policy in Let users launch compute instances from a specific custom image restricts the ability to create an instance from a custom image on an image-by-image basis.

Tip

When users create a custom image from an instance or launch an instance from a custom image, the instance and image don't have to be in the same compartment . However, users must have access to both compartments.
If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for Core Services.

Limitations and Considerations

  • Certain IP addresses are reserved for Oracle Cloud Infrastructure use and may not be used in your address numbering scheme. See IP Addresses Reserved for Use by Oracle for more information.
  • Before you create a custom image of an instance, you must disconnect all iSCSI attachments and remove all iscsid node configurations from the instance. For steps, see Disconnecting From a Volume.
  • 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 cannot create additional custom images of an instance while the instance is engaged in the image creation process. When you start to create a custom image, the system implements a 20-minute timeout, during which you cannot 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 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.
  • The maximum size for importing a custom image is 400 GB.
  • The maximum size for custom exported images is 400 GB.
  • You can create custom images from some Marketplace images, such as the Microsoft SQL Server Enterprise image. Marketplace and the image publisher decide which images are supported.
  • You cannot 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. See OS Kernel Updates for Legacy Linux Instances for more information.
  • You are charged for stored images, as shown in the Cloud Price List.
  • Cross region replication is not supported for custom images.

For information about how to deploy any version of any operating system that is supported by the Oracle Cloud Infrastructure hardware, see Bring Your Own Image (BYOI).

Using the Console

To create a custom image
  1. If you're creating a custom image from a Windows instance: Connect to the instance by using a Remote Desktop connection and shut down the instance from the operating system.
  2. Open the navigation menu and click Compute. Under Compute, 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.
  5. In the Create in compartment list, select the compartment to create the custom image in.
  6. Enter a Name for the image. You can change the name later, if needed. You cannot use the name of a platform image for a custom image. Avoid entering confidential information.
  7. Show tagging options: If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
  8. Click Create custom image.

    To track the progress of the operation and troubleshoot errors that occur during instance creation, use the associated work request.

Note

If you see a message indicating that you are at the limit for custom images, you must delete at least one image before you can create another. Or, you can request a service limit increase.

To launch an instance from a custom image
  1. Open the navigation menu and click Compute. Under Compute, click Custom Images.
  2. Click the custom image that you're interested in.
  3. Click Create instance.
  4. Provide additional details as described in Creating an Instance.
To edit the name or compatible shapes for a custom image
  1. Open the navigation menu and click Compute. Under Compute, click Custom Images.
  2. Click the custom image that you're interested in.
  3. Click Edit details.
  4. Edit the name. Avoid entering confidential information.
  5. Add and remove compatible shapes for the custom image. To configure the number of OCPUs and amount of memory that users can select when they use this image on a flexible shape, click the down arrow in the row for the shape. Then, enter values in the fields for minimum and maximum OCPU count and memory.
  6. Click Save changes.

    Note

    After you add shape compatibility to an image, test the image on the shape to ensure that the image actually works on the shape. Some images (especially Windows) might never be cross-compatible with other shapes because of driver or hardware differences.
To view compatible shapes for a custom image
  1. Open the navigation menu and click Compute. Under Compute, click Custom Images.
  2. Click the custom image that you're interested in.
  3. Click the Compatible shapes tab to view the list of shapes that are compatible with the custom image.

To manage tags for a custom image
  1. Open the navigation menu and click Compute. Under Compute, click Custom Images.
  2. Click the custom image that you're interested in.
  3. Click the Tags tab to view or edit the existing tags. Or click More Actions, and then click Add Tags to add new ones.

For more information, see Resource Tags.

To delete a custom image
  1. Open the navigation menu and click Compute. Under Compute, click Custom Images.
  2. Click the custom image that you're interested in.
  3. Click More Actions, and then click Delete. Confirm when prompted.

X5 and X7 Compatibility for Custom Images

Oracle X5, X6, and X7 servers have different host hardware. As a result, using an X5 or X6 image on an X7 bare metal or virtual machine (VM) instance may not work without additional modifications. Oracle recommends for X7 hosts that you use the platform images for X7. See Image Release Notes for more information about which images support X7. These images have been explicitly created and tested with X7 hardware.

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

  • No Windows versions are cross-compatible.
  • Oracle Autonomous Linux 7 and Oracle Linux 8 are cross-compatible.
  • Oracle Linux 6, Oracle Linux 7, Oracle Linux 8, Oracle Linux 9, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, CentOS 7, and CentOS Stream 8 are cross-compatible. You may have to update the kernel, however, to the most recent version to install the latest device drivers. To update the kernel, run one of the following commands from a terminal session:
    • Oracle Linux
      yum update
    • CentOS 7, CentOS Stream 8
      yum update
    • Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04
      apt-get update
                                  apt-get dist-upgrade

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

  • 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 22.04, Ubuntu 20.04, and Ubuntu 18.04 are cross-compatible. Use the platform images for X6.

The primary device drivers that are different between X5, X6, and X7 hosts are:

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

Additional updates might be required depending on how you have customized the image.