10 Image List
The machine images that you can use for creating instances are stored in image lists. You can add machine images to an image list to create a versioned selection of related machine images. For example, you might want to set up an image list containing a selection of machine images of various Oracle Linux releases. When you create an instance, by using a launch plan for example, you must specify the image list that contains the image you want to use. You can also specify the entry in the image list which you want to use to launch instances. If you don’t specify an entry, the default entry defined for the image list is used. For more information, see Maintaining Versions of Private Machine Images in Using Oracle Cloud Infrastructure Compute Classic.
Before running the CLI commands described in this section, make sure that you've installed the CLI client and set up the required environment variables as described in Preparing to Use the CLI.
image-list add
Adds an image list to Compute Classic.
After adding an image list, you can add machine images to the image list as described in image-list-entry add.
Required Role
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 Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute image-list add name description [--default default]
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute image-list add /Compute-acme/jack.jones@example.com/prodimages 'Linux images for production environment'
Sample Output
{ "default": 1, "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/Compute-acme/jack.jones@example.com/prodimages", "description": "Linux images for production environment", "name": "/Compute-acme/jack.jones@example.com/prodimages", "entries": [] }
image-list list
Retrieves details of all the available image lists in the specified container.
Required Role
To complete this task, you must have the Compute_Monitor
or 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 Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute image-list list container
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute image-list list /oracle/public
Sample Output
Note that this output is merely an example. The image lists displayed when you run this command may be different.
{ "result": [ { "default": 1, "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/oracle/public/oel_6.4_60GB", "description": "OEL 6 60GB disk", "name": "/oracle/public/oel_6.4_60GB", "entries": [ { "attributes": {}, "version": 1, "machineimages": [ "/oracle/public/oel6.4_60GB_20140410" ], "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/oracle/public/oel_6.4_60GB/entry/1" } ] } ] }
image-list discover
Required Role
To complete this task, you must have the Compute_Monitor
or 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 Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute image-list discover container
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute image-list discover /oracle/public
Sample Output
Note that this output is merely an example. The image lists displayed when you run this command may be different.
{ "result": [ "/oracle/public/oel_6.4_60GB", "/oracle/public/oel_6.4_5GB", "/oracle/public/oel_6.4_20GB" ] }
image-list get
Retrieves details of the specified image list. You can also use this request to retrieve details of all the available image list entries in the specified image list.
Required Role
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 Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute image-list get name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute image-list get /oracle/public/oel_6.4_60GB
Sample Output
Note that this output is merely an example. The image-list details displayed when you run this command may be different.
{ "default": 1, "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/oracle/public/oel_6.4_60GB", "description": "OEL 6 60GB disk", "name": "/oracle/public/oel_6.4_60GB", "entries": [ { "attributes": {}, "version": 1, "machineimages": [ "/oracle/public/oel6.4_60GB_20140410" ], "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/oracle/public/oel_6.4_60GB/entry/1" } ] }
image-list update
Updates the description of an image list. You can also update the default image list entry to be used while launching instances using the specified image list.
Required Role
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 Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute image-list update name description [--default default]
For help with the parameters and options of this command, run the command with the -h
option.
Example
This command updates the description and the default image list entry to be used while launching instances using this image list for the /Compute-acme/jack.jones@example.com/prodimages
image list.
opc -f json compute image-list update /Compute-acme/jack.jones@example.com/prodimages 'production images' --default 2
Sample Output
{ "default": 2, "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/Compute-acme/jack.jones@example.com/prodimages", "description": "production images", "name": "/Compute-acme/jack.jones@example.com/prodimages", "entries": [] }
image-list delete
Deletes an image list. No response is returned.
You can’t delete system-provided image lists that are available in the /oracle/public
container.
Required Role
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 Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute image-list delete name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc compute image-list delete /Compute-acme/jack.jones@example.com/ol6