• Recent blogs

    How to create custom images in OCI(Oracle Cloud Infrastructure )

     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 or VM 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

    OCI Custom Image
    OCI Custom Image

    Some Limitations 

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

    • 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.

    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.

    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.
    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. 

    4.Click Save Changes.
    Edit Custom Image
    Edit Custom Image

    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.

    No comments