Registering a Machine Image in Compute Classic

You can create your own machine images, register them in Compute Classic, and then use the images to launch instances.

Note:

For information about the operating systems that you can use to build machine images, see Guidelines for Building Private Images.

Prerequisites

  • To complete this task, you must have the Compute_Operations role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

  • You must have uploaded the machine image file to Oracle Cloud Infrastructure Object Storage Classic. See Uploading Image Files to Oracle Cloud Infrastructure Object Storage Classic.

Procedure

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
  3. Click Associate Image.
  4. Enter a name and description for the new image, select the image file, and click Add.
You can now use your machine image to launch instances.

To do this using the CLI, use the opc compute machine-image add, opc compute image-list add, and opc compute image-list-entry add commands, in that order. For help with these commands, run each command with the -h option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.

To do this using the API, invoke the POST /machineimage/, POST /imagelist/, and POST /imagelistentry/ methods, in that order. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.