https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/imageimportexport.htm#Exporting
Exporting an Image
You can use the Console or API to export images, and the exported images are stored in the Oracle Cloud Infrastructure Object Storage service. To perform an image export, you need write access to the Object Storage bucket for the image. For more information, see Overview of Object Storage and Let users write objects to Object Storage buckets.
To export an image using the Console
- Open the navigation menu and click Compute. Under Compute, click Custom Images.
- Click the custom image that you’re interested in.
- Click Export.
- Specify the Object Storage location to export the image to:
- Export to an Object Storage bucket: Select a bucket. Then, enter a name for the exported image. Avoid entering confidential information.
- Export to an Object Storage URL: Enter the Object Storage URL.
- In the Image format list, select the format that you want to export the image to. The following formats are available:
- Oracle Cloud Infrastructure file with a QCOW2 image and OCI metadata (.oci). Use this format to export a custom image that you want to import into other tenancies or regions.
- QEMU Copy On Write (.qcow2)
- Virtual Disk Image (.vdi) for Oracle VM VirtualBox
- Virtual Hard Disk (.vhd) for Hyper-V
- Virtual Machine Disk (.vmdk)
- Click Export image.
After you click Export image, the image state changes to Exporting. Images are a copy of the VM or BM instance boot volume and metadata when the image is created, capturing the current state of the instance. Exporting a custom image copies the data to the Object Storage location that you specified. You can still launch instances while the image is exporting, but you can’t delete the image until the export has finished. To track the progress of the operation and troubleshoot errors that occur during instance creation, use the associated work request.
When the export is complete, the image state changes to Available. If the image state changes to Available, but you don’t see the exported image in the Object Storage location you specified, the export failed, and you need to go through the steps again to export the image.
Importing an Image
You can use the Console or API to import exported images from Object Storage. To import an image, you need read access to the Object Storage object containing the image. For more information, see Let users download objects from Object Storage buckets.
To import an image using the Console
- Open the navigation menu and click Compute. Under Compute, click Custom Images.
- Click Import image.
- In the Create in compartment list, select the compartment that you want to import the image to.
- Enter a Name for the image. Avoid entering confidential information.
- Select the Operating system:
- For Linux images, select Linux.
- For Windows images, select Windows. Select the Operating system version, and then certify that the selected operating system complies with Microsoft licensing agreements.
- Specify the Object Storage location to import the image from:
- Import from an Object Storage bucket: Select the Bucket that contains the image. In the Object name list, select the image file.
- Import from an Object Storage URL: Enter the Object Storage URL of the image. When importing across tenancies, you must specify a pre-authenticated request URL.
- In the Image type section, select the format of the image. The following formats are available:
- VMDK: Virtual Machine Disk (.vmdk)
- QCOW2: QEMU Copy On Write (.qcow2)
- OCI: Oracle Cloud Infrastructure file with a QCOW2 image and OCI metadata (.oci). Use this format when importing a custom image that was exported from another tenancy or region.
- Select the Launch mode:
- For custom images where the image type is
.oci
, the launch mode is disabled. Oracle Cloud Infrastructure selects the appropriate launch mode based on the launch mode for the source image. - For custom images exported from Oracle Cloud Infrastructure where the image type is QCOW2, select Native mode.
- To import other custom images, select Paravirtualized mode or Emulated mode. For more information, see Bring Your Own Image.
- For custom images where the image type is
- Show tagging options: If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you’re not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
- Click Import image.
After you click Import image, you’ll see the imported image in the Custom images list for the compartment, with a state of Importing. To track the progress of the operation and troubleshoot errors that occur during instance creation, use the associated work request.
When the import completes successfully, the state changes to Available. If the state does not change, or no entry appears in the Custom images list, the import failed. If the import failed, ensure you have read access to the Object Storage object, and that the object contains a supported image.