Create Your Custom Machine Image

When you are done customizing your instance, to use the instance as a template to create other instances, create an instance snapshot. Instance snapshots capture the current state of your boot disk and create a corresponding machine image. These instances will contain all the configuration and customization that you’d done on the original instance when you took the snapshot.

  1. Create an instance snapshot using the Oracle Compute CLI with the --machineimage option.
    oracle-compute add snapshot instance_name --machineimage image_name 
    

    Example:

    oracle-compute add snapshot /mytenant/public/af2c7a90-36ee-4276-a567-665913f1f4dc --machineimage /mytenant/public/mycustomimage 
    

    Note:

    The result of an instance snapshot is a machine image. Any networking, host name, and SSH key information are not saved to the machine image. For more information, see Creating a Snapshot of an Instance
  2. Add the image to the imagelist:
    oracle-compute add imagelist image_name description
    

    Example:

    oracle-compute add imagelist /mytenant/public/mycustomimage "imagelist for custom image"
    
  3. Create an imagelistentry:
    oracle-compute add imagelistentry image_name imagelistentry_name version
    
    oracle-compute add imagelistentry /mytenant/public/mycustomimage /mytenant/public/mycustomimage 1
    

You can delete the instance and use your custom machine image to deploy more instances.

Note:

By default, this image is only available to the specified tenant. To make it accessible to all tenants on the machine, you can submit a Change Request to Oracle Cloud Ops using My Oracle Support.