GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COMPUTE_IMAGE(1) OCI CLI Command Reference COMPUTE_IMAGE(1)

compute_image -

A boot disk image for launching an instance. For more information, see Overview of the Compute Service <https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm>.

To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see Getting Started with Policies <https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm>.

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

  • change-compartment
  • create
  • delete
  • export
  • to-object
  • to-object-uri

  • get
  • import
  • from-object
  • from-object-uri

  • list
  • update

  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Moves an image into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment <https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes>.

oci compute image change-compartment [OPTIONS]


--compartment-id, -c [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the compartment to move the image to.

--image-id [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the image.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/change-compartment.html#cmdoption-compartment-id
    export image_id=<substitute-value-of-image_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/change-compartment.html#cmdoption-image-id
    oci compute image change-compartment --compartment-id $compartment_id --image-id $image_id


  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters

Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service.

When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and the OCID of the compartment containing that instance. For more information about images, see Managing Custom Images <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm>.

When importing an exported image from Object Storage, you specify the source information in ImageSourceDetails <https://docs.cloud.oracle.com/api/#/en/iaas/latest/requests/ImageSourceDetails>.

When importing an image based on the namespace, bucket name, and object name, use ImageSourceViaObjectStorageTupleDetails <https://docs.cloud.oracle.com/api/#/en/iaas/latest/requests/ImageSourceViaObjectStorageTupleDetails>.

When importing an image based on the Object Storage URL, use ImageSourceViaObjectStorageUriDetails <https://docs.cloud.oracle.com/api/#/en/iaas/latest/requests/ImageSourceViaObjectStorageUriDetails>. See Object Storage URLs <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs> and Using Pre-Authenticated Requests <https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm> for constructing URLs for image import/export.

For more information about importing exported images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

You may optionally specify a display name for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See UpdateImage <https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/update.html>. Avoid entering confidential information.

oci compute image create [OPTIONS]


--compartment-id, -c [text]

The OCID of the compartment you want the image to be created in.

--defined-tags [complex type]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Operations": {"CostCenter": "42"}}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--display-name [text]

A user-friendly name for the image. It does not have to be unique, and it’s changeable. Avoid entering confidential information.

You cannot use a platform image name as a custom image name.

Example:

My Oracle Linux image


--freeform-tags [complex type]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Department": "Finance"}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--image-source-details [complex type]

[DEPRECATED] The use of the oci compute image create command to import an image from Object Storage is deprecated.

? Please use the oci compute image import command instead.

This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

Example:

'{ "objectName": "image-to-import.qcow2", "bucketName": "MyBucket", "namespaceName": "MyNamespace", "sourceType": "objectStorageTuple" }'


or

‘{ “sourceUri”: “https://objectstorage.us-phoenix-1.oraclecloud.com/n/MyNamespace/b/MyBucket/o/image-to-import.qcow2”, “sourceType”: “objectStorageUri” }’

--instance-id [text]

The OCID of the instance you want to use as the basis for the image.

--launch-mode [text]

Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * NATIVE - VM instances launch with paravirtualized boot and VFIO devices. The default value for platform images. * EMULATED - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter.

Accepted values are:

CUSTOM, EMULATED, NATIVE, PARAVIRTUALIZED


--max-wait-seconds [integer]

The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.

--wait-for-state [text]

This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.

Accepted values are:

AVAILABLE, DELETED, DISABLED, EXPORTING, IMPORTING, PROVISIONING


--wait-interval-seconds [integer]

Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Deletes an image.

oci compute image delete [OPTIONS]


--image-id [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the image.

--force

Perform deletion without prompting for confirmation.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

--max-wait-seconds [integer]

The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.

--wait-for-state [text]

This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.

Accepted values are:

AVAILABLE, DELETED, DISABLED, EXPORTING, IMPORTING, PROVISIONING


--wait-interval-seconds [integer]

Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export image_id=<substitute-value-of-image_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/delete.html#cmdoption-image-id
    oci compute image delete --image-id $image_id


Exports an image to the Oracle Cloud Infrastructure Object Storage Service. You can use the Object Storage Service URL, or the namespace, bucket name, and object name when specifying the location to export to.

For more information about exporting images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

To perform an image export, you need write access to the Object Storage Service bucket for the image, see Let Users Write Objects to Object Storage Buckets <https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/commonpolicies.htm#Let4>.

See Object Storage URLs <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs> and [pre-authenticated requests] for constructing URLs for image import/export.

  • to-object
  • to-object-uri

  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Exports the specified image to the Oracle Cloud Infrastructure Object Storage Service using the namespace, bucket name, and object name to identify the location to export to.

For more information about exporting images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

To perform an image export, you need write access to the Object Storage Service bucket for the image, see Let Users Write Objects to Object Storage Buckets <https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/commonpolicies.htm#Let4>.

oci compute image export to-object [OPTIONS]


-bn, --bucket-name [text]

The name of the bucket to export the image to.

--image-id [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the image.

--name [text]

The name which will be given to the exported image object.

-ns, --namespace [text]

The Object Storage Service namespace to export the image to.

--export-format [text]

The format to export the image to. The default value is OCI.

The following image formats are available:

OCI - Oracle Cloud Infrastructure file with a QCOW2 image and Oracle Cloud Infrastructure metadata (.oci). Use this format to export a custom image that you want to import into other tenancies or regions. - QCOW2 - QEMU Copy On Write (.qcow2) - VDI - Virtual Disk Image (.vdi) for Oracle VM VirtualBox - VHD - Virtual Hard Disk (.vhd) for Hyper-V - VMDK - Virtual Machine Disk (.vmdk)

Accepted values are:

OCI, QCOW2, VDI, VHD, VMDK


--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export bucket_name=<substitute-value-of-bucket_name> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/export/to-object.html#cmdoption-bucket-name
    export image_id=<substitute-value-of-image_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/export/to-object.html#cmdoption-image-id
    export name=<substitute-value-of-name> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/export/to-object.html#cmdoption-name
    export namespace=<substitute-value-of-namespace> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/export/to-object.html#cmdoption-namespace
    oci compute image export to-object --bucket-name $bucket_name --image-id $image_id --name $name --namespace $namespace


  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Exports the specified image to the Oracle Cloud Infrastructure Object Storage Service using the Object Storage Service URL to identify the location to export to.

For more information about exporting images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

See Object Storage URLs <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs> and [pre-authenticated requests] for constructing URLs for image import/export.

oci compute image export to-object-uri [OPTIONS]


--image-id [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the image.

--uri [text]

The Object Storage URL to export the image to.

--export-format [text]

The format to export the image to. The default value is OCI.

The following image formats are available:

OCI - Oracle Cloud Infrastructure file with a QCOW2 image and Oracle Cloud Infrastructure metadata (.oci). Use this format to export a custom image that you want to import into other tenancies or regions. - QCOW2 - QEMU Copy On Write (.qcow2) - VDI - Virtual Disk Image (.vdi) for Oracle VM VirtualBox - VHD - Virtual Hard Disk (.vhd) for Hyper-V - VMDK - Virtual Machine Disk (.vmdk)

Accepted values are:

OCI, QCOW2, VDI, VHD, VMDK


--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export image_id=<substitute-value-of-image_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/export/to-object-uri.html#cmdoption-image-id
    export uri=<substitute-value-of-uri> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/export/to-object-uri.html#cmdoption-uri
    oci compute image export to-object-uri --image-id $image_id --uri $uri


  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Gets the specified image.

oci compute image get [OPTIONS]


--image-id [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the image.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export image_id=<substitute-value-of-image_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/get.html#cmdoption-image-id
    oci compute image get --image-id $image_id


Imports an exported image from the Oracle Cloud Infrastructure Object Storage Service. You can use the Object Storage Service URL, or the namespace, bucket name, and object name when specifying the location to import from.

For more information about importing exported images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

See Object Storage URLs <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs> and [pre-authenticated requests] for constructing URLs for image import/export.

You may optionally specify a display name for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See UpdateImage <https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/update.html>. Avoid entering confidential information.

  • from-object
  • from-object-uri

  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Imports an exported image from the Oracle Cloud Infrastructure Object Storage Service using the namespace, bucket name, and object name to identify the location to import from.

For more information about importing exported images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

You may optionally specify a display name for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See UpdateImage <https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/update.html>. Avoid entering confidential information.

oci compute image import from-object [OPTIONS]


-bn, --bucket-name [text]

The name of the bucket to import the image from.

--compartment-id, -c [text]

The OCID of the compartment you want the image to be created in.

--name [text]

The name of the object identifying the image to import.

-ns, --namespace [text]

The Object Storage Service namespace to import the image from.

--defined-tags [complex type]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Operations": {"CostCenter": "42"}}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--display-name [text]

A user-friendly name for the image. It does not have to be unique, and it’s changeable. Avoid entering confidential information.

You cannot use a platform image name as a custom image name.

Example:

My Oracle Linux image


--freeform-tags [complex type]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Department": "Finance"}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--launch-mode [text]

Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * NATIVE - VM instances launch with paravirtualized boot and VFIO devices. The default value for platform images. * EMULATED - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter.

Accepted values are:

CUSTOM, EMULATED, NATIVE, PARAVIRTUALIZED


--operating-system [text]

The image’s operating system.

Example:

Oracle Linux


--operating-system-version [text]

The image’s operating system version.

Example:

7.2


--source-image-type [text]

The format of the image to be imported. Exported Oracle images are QCOW2. Only monolithic images are supported.

Accepted values are:

QCOW2, VMDK


Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export bucket_name=<substitute-value-of-bucket_name> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/import/from-object.html#cmdoption-bucket-name
    export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/import/from-object.html#cmdoption-compartment-id
    export name=<substitute-value-of-name> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/import/from-object.html#cmdoption-name
    export namespace=<substitute-value-of-namespace> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/import/from-object.html#cmdoption-namespace
    oci compute image import from-object --bucket-name $bucket_name --compartment-id $compartment_id --name $name --namespace $namespace


  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Imports an exported image from the Oracle Cloud Infrastructure Object Storage Service using the Object Storage Service URL to identify the location to import from.

For more information about importing exported images, see Image Import/Export <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm>.

See Object Storage URLs <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs> and [pre-authenticated requests] for constructing URLs for image import/export.

You may optionally specify a display name for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See UpdateImage <https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/update.html>. Avoid entering confidential information.

oci compute image import from-object-uri [OPTIONS]


--compartment-id, -c [text]

The OCID of the compartment you want the image to be created in.

--uri [text]

The Object Storage URL to import the image from.

--defined-tags [complex type]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Operations": {"CostCenter": "42"}}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--display-name [text]

A user-friendly name for the image. It does not have to be unique, and it’s changeable. Avoid entering confidential information.

You cannot use a platform image name as a custom image name.

Example:

My Oracle Linux image


--freeform-tags [complex type]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Department": "Finance"}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--launch-mode [text]

Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * NATIVE - VM instances launch with paravirtualized boot and VFIO devices. The default value for platform images. * EMULATED - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter.

Accepted values are:

CUSTOM, EMULATED, NATIVE, PARAVIRTUALIZED


--operating-system [text]

The image’s operating system.

Example:

Oracle Linux


--operating-system-version [text]

The image’s operating system version.

Example:

7.2


--source-image-type [text]

The format of the image to be imported. Exported Oracle images are QCOW2. Only monolithic images are supported.

Accepted values are:

QCOW2, VMDK


Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/import/from-object-uri.html#cmdoption-compartment-id
    export uri=<substitute-value-of-uri> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/import/from-object-uri.html#cmdoption-uri
    oci compute image import from-object-uri --compartment-id $compartment_id --uri $uri


  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Lists a subset of images available in the specified compartment, including platform images <https://docs.cloud.oracle.com/iaas/Content/Compute/References/images.htm> and custom images <https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm>. The list of platform images includes the three most recently published versions of each major distribution.

The list of images returned is ordered to first show the recent platform images, then all of the custom images.

Caution: Platform images are refreshed regularly. When new images are released, older versions are replaced. The image OCIDs remain available, but when the platform image is replaced, the image OCIDs are no longer returned as part of the platform image list.

oci compute image list [OPTIONS]


--compartment-id, -c [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the compartment.

--all

Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.

--display-name [text]

A filter to return only resources that match the given display name exactly.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--lifecycle-state [text]

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Accepted values are:

AVAILABLE, DELETED, DISABLED, EXPORTING, IMPORTING, PROVISIONING


--limit [integer]

For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. For important details about how pagination works, see List Pagination <https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine>.

Example:

50


--operating-system [text]

The image’s operating system.

Example:

Oracle Linux


--operating-system-version [text]

The image’s operating system version.

Example:

7.2


--page [text]

For list pagination. The value of the opc-next-page response header from the previous “List” call. For important details about how pagination works, see List Pagination <https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine>.

--page-size [integer]

When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.

--shape [text]

Shape name.

--sort-by [text]

The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

Note: In general, some “List” operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these “List” operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

Accepted values are:

DISPLAYNAME, TIMECREATED


--sort-order [text]

The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive.

Accepted values are:

ASC, DESC


Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/list.html#cmdoption-compartment-id
    oci compute image list --compartment-id $compartment_id


  • Description
  • Usage
  • Required Parameters
  • Optional Parameters
  • Global Parameters
  • Examples

Updates the display name of the image. Avoid entering confidential information.

oci compute image update [OPTIONS]


--image-id [text]

The OCID <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm> of the image.

--defined-tags [complex type]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Operations": {"CostCenter": "42"}}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--display-name [text]

A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.

--force

Perform update without prompting for confirmation.

--freeform-tags [complex type]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags <https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm>.

Example:

{"Department": "Finance"}


This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

--max-wait-seconds [integer]

The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.

--operating-system [text]

Operating system

Example:

Oracle Linux


--operating-system-version [text]

Operating system version

Example:

7.4


--wait-for-state [text]

This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.

Accepted values are:

AVAILABLE, DELETED, DISABLED, EXPORTING, IMPORTING, PROVISIONING


--wait-interval-seconds [integer]

Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.

Use oci --help for help on global parameters.

--auth-purpose, --auth, --cert-bundle, --cli-auto-prompt, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --latest-version, --max-retries, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --release-info, --request-id, --version, -?, -d, -h, -i, -v

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration <https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile> and appropriate security policies <https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/policygetstarted.htm> before trying the examples.

    export image_id=<substitute-value-of-image_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute/image/update.html#cmdoption-image-id
    oci compute image update --image-id $image_id


Oracle

2016, 2022, Oracle
May 17, 2022 3.9.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.