Uploading a Private Template

When you upload the machine image from the web console, an image list is automatically created using the name that you specified for the image. The new machine image becomes the default (and only) entry in the image list.

Ensure that the .tar.gz file is available on the local disk or software library of the Enterprise Manager UI.

  1. Log in to the UI and go to the Self Service Portal.
  2. In the Self Service Portal, click the Library tab.
  3. Click Upload.
  4. Enter a name for the template.
  5. (Optional) Provide attributes as comma-separated key value pairs.
    Attributes are user-defined parameters passed to an instance using this template when it is launched.
  6. Select the template file to upload from your local system or from the Software Library.
  7. Click Upload.

Uploading a Private Template Using the CLI or API

Uploading a private template using the CLI requires you to add the machine image, create an image list, and add an image list entry.

Use the following commands to upload a private template:

  1. Add a machine image.

    oracle-compute add machineimage name file [--attributes] [--quota]

  2. Add an image list.

    oracle-compute add imagelist name description [--default]

  3. Add an image list entry.

    oracle-compute add imagelistentry imagelist name machineimages version [--attributes]

For more information, see CLI Reference for Oracle Compute Cloud Service.

The following table lists the API method for uploading a template.

Action Method and URI
Add a machine image by creating and uploading a machine image

POST http://api.oc.example.com/machineimage/

POST http://api.oc.example.com/machineimage/ImageLocation

Add an image list POST https://api.oc.example.com/imagelist/
Add an image list entry POST https://api.oc.example.com/imagelist/name/entry/

For more information, see REST API Reference for Oracle Compute Cloud Service.