CreateImage

post

/20160918/images

Create a boot disk image for the specified instance or import an exported image from the 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 that contains that instance.

When importing an exported image from Object Storage, specify the source information in imageSourceDetails. When importing an image based on the namespace, bucket name, and object name, use ImageSourceViaObjectStorageTupleDetails. When importing an image based on the Object Storage URL, use ImageSourceViaObjectStorageUriDetails.

The launchMode parameter 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.

    The bootVolumeType specifies the emulation type for the boot volume.

  • ISCSI - ISCSI attached block storage device.
  • SCSI - Emulated SCSI disk.
  • IDE - Emulated IDE disk.
  • VFIO - Direct attached Virtual Function storage. This is the default option for local data volumes on platform images.
  • PARAVIRTUALIZED - Paravirtualized disk. This is the default for boot volumes and remote block storage volumes on platform images.

    You can optionally specify a display name for the image. It does not need to be unique, and you can change it. Avoid entering confidential information.

  • Request

    Supported Media Types
    Header Parameters
    • Minimum Length: 1
      Maximum Length: 64
      A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
    Body ()
    Image creation details.
    Root Schema : CreateImageDetails
    Type: object
    Either instanceId or imageSourceDetails must be provided in addition to other required parameters.
    Show Source
    Nested Schema : definedTags
    Type: object
    Additional Properties Allowed
    Show Source
    Defined tags for this resource. Each key is predefined and scoped to a namespace.
    Nested Schema : freeformTags
    Type: object
    Additional Properties Allowed
    Show Source
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
    Nested Schema : ImageSourceDetails
    Type: object
    Discriminator: sourceType
    Show Source
    • Minimum Length: 1
      Maximum Length: 255
    • Minimum Length: 1
      Maximum Length: 255
    • Allowed Values: [ "QCOW2", "VMDK" ]
      The format of the image to be imported. Only monolithic images are supported. This attribute is not used for exported Oracle images with the OCI image format.
    • The source type for the image. Use objectStorageTuple when specifying the namespace, bucket name, and object name. Use objectStorageUri when specifying the Object Storage URL.
    Nested Schema : LaunchOptions
    Type: object
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    Show Source
    • Allowed Values: [ "ISCSI", "SCSI", "IDE", "VFIO", "PARAVIRTUALIZED", "NVME" ]
      Emulation type for the boot volume. See the description of LaunchInstance for descriptions of each possible value.
    • Allowed Values: [ "BIOS", "UEFI_64" ]
      Firmware used to boot VM. Select the option that matches your operating system. BIOS - Boot VM using BIOS style firmware. This is compatible with both 32 bit and 64 bit operating systems that boot using MBR style bootloaders. UEFI_64 - Boot VM using UEFI style firmware compatible with 64 bit operating systems. This is the default for platform images.
    • Whether to enable consistent volume naming feature. Defaults to false.
    • Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    • Allowed Values: [ "E1000", "VFIO", "PARAVIRTUALIZED" ]
      Emulation type for the physical network interface card (NIC). E1000 - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. VFIO - Direct attached Virtual Function network controller. This is the networking type when you launch an instance using hardware-assisted (SR-IOV) networking. PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers.
    • Allowed Values: [ "ISCSI", "SCSI", "IDE", "VFIO", "PARAVIRTUALIZED", "NVME" ]
      Emulation type for volume.
    • ISCSI - ISCSI attached block storage device.
    • SCSI - Emulated SCSI disk.
    • IDE - Emulated IDE disk.
    • VFIO - Direct attached Virtual Function storage. This is the default option for local data volumes on platform images.
    • PARAVIRTUALIZED - Paravirtualized disk. This is the default for boot volumes and remote block storage volumes on platform images.
    • NVME - NVMe disk.
    Nested Schema : additionalProperties
    Type: object
    Additional Properties Allowed
    Show Source
    Key-value pair representing a defined tag key and value, scoped to a namespace.
    Nested Schema : additionalProperties
    Type: object
    The value of the tag. Only the String type is supported.
    Back to Top

    Response

    Supported Media Types

    200 Response

    The image is being created.
    Headers
    • For optimistic concurrency control. See if-match.
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    • The OCID of the work request. Use GetWorkRequest with this OCID to track the status of the request.
    Body ()
    Root Schema : Image
    Type: object
    A boot disk image for launching an instance. Avoid entering confidential information.
    Show Source
    Nested Schema : InstanceAgentFeatures
    Type: object
    Oracle Cloud Agent features supported on the image.
    Show Source
    Nested Schema : definedTags
    Type: object
    Additional Properties Allowed
    Show Source
    Defined tags for this resource. Each key is predefined and scoped to a namespace.
    Nested Schema : freeformTags
    Type: object
    Additional Properties Allowed
    Show Source
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
    Nested Schema : LaunchOptions
    Type: object
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    Show Source
    • Allowed Values: [ "ISCSI", "SCSI", "IDE", "VFIO", "PARAVIRTUALIZED", "NVME" ]
      Emulation type for the boot volume. See the description of LaunchInstance for descriptions of each possible value.
    • Allowed Values: [ "BIOS", "UEFI_64" ]
      Firmware used to boot VM. Select the option that matches your operating system. BIOS - Boot VM using BIOS style firmware. This is compatible with both 32 bit and 64 bit operating systems that boot using MBR style bootloaders. UEFI_64 - Boot VM using UEFI style firmware compatible with 64 bit operating systems. This is the default for platform images.
    • Whether to enable consistent volume naming feature. Defaults to false.
    • Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    • Allowed Values: [ "E1000", "VFIO", "PARAVIRTUALIZED" ]
      Emulation type for the physical network interface card (NIC). E1000 - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. VFIO - Direct attached Virtual Function network controller. This is the networking type when you launch an instance using hardware-assisted (SR-IOV) networking. PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers.
    • Allowed Values: [ "ISCSI", "SCSI", "IDE", "VFIO", "PARAVIRTUALIZED", "NVME" ]
      Emulation type for volume.
    • ISCSI - ISCSI attached block storage device.
    • SCSI - Emulated SCSI disk.
    • IDE - Emulated IDE disk.
    • VFIO - Direct attached Virtual Function storage. This is the default option for local data volumes on platform images.
    • PARAVIRTUALIZED - Paravirtualized disk. This is the default for boot volumes and remote block storage volumes on platform images.
    • NVME - NVMe disk.
    Nested Schema : additionalProperties
    Type: object
    Additional Properties Allowed
    Show Source
    Key-value pair representing a defined tag key and value, scoped to a namespace.
    Nested Schema : additionalProperties
    Type: object
    The value of the tag. Only the string type is supported.

    400 Response

    Bad Request
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    401 Response

    Unauthorized
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    404 Response

    Not Found
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    409 Response

    Conflict
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    500 Response

    Internal Server Error
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    Default Response

    An error has occurred.
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source
    Back to Top

    Examples

    Example - Create an image for the specified instance.

    POST /20160918/images {
      "instanceId": "ocid1.instance.unique_ID,
      "compartmentId": "ocid1.compartment.unique_ID",
      "displayName": "MyCustomImage"
    }

    Example - Import an image using the namespace, bucket name, and object name.

    POST /20160918/images {
      "compartmentId": "ocid1.compartment.unique_ID",
      "imageSourceDetails": (
        "bucketName": "MyBucket",
        "namespaceName": "MyNamespace",
        "objectName": "image_to_import.oci",
        "sourceType": "objectStorageTuple"
      }
    }

    Example - Import an image using the Object Storage URL.

    POST /20160918/images {
      "compartmentId": "ocid1.compartment.unique_ID",
      "displayName": "MyImportedImage",
      "imageSourceDetails": (
        "sourceUri": "http://fqdn_or_ip_address/compute_images/uln-pca-image_to_import.oci",
        "sourceType": "objectStorageUri"
      }
    }
    Back to Top