Note:

Create and download a virtual machine image for using outside OCI

Introduction

Oracle Cloud Infrastructure (OCI) uses images to launch virtual machine (VM) instances. You specify an image to use when you launch an instance. You can create a custom image of an instance boot disk and use it to launch other instances. Instances you launch from your image include the customizations, configuration, and software installed when you created the image. These images do not include the data from any attached block volumes. You can also use these images to launch virtual machines outside the OCI environment.

Objective

Create a VM image in OCI and download the image for using outside OCI environment.

Prerequisites

Task 1: Create custom image of the VM instance

  1. Open the instance details page on the console of which you want to create the image.

  2. Click More actions.

  3. Click Create custom image.

    instance page

  4. Enter the custom image name and click Create custom image. System will be taken offline for several minutes during this imaging process.

    Create custom image

    Note: Instance will be offline for some time and you can see the status CREATING IMAGE in the console.

    creating image

Task 2: Download VM instance image for using outside OCI

  1. Open the created custom image page on console and click Export.

    Custom-image-export

    1. Select the Export to an Object Storage bucket option.

    2. Select Bucket in which you want to store the image and give any image name. Select Image format in which you want image to be stored in object storage. Formats available are:

      • 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)

    3. Click Export image.

      Export image

      You can see the status of the custom image as EXPORTING.

      Exporting custom image

  2. Open the object storage bucket in which you exported the image. Click the ellipsis icon on the image object and then click Create Pre-Authenticated Request.

    object storage

  3. Select Pre-Authenticated Request Target as Object, Access Type as Permit object reads and enter the Expiration date of Pre-Authenticated Request URL.

    PAR

  4. Click Create Pre-Authenticated Request. The Pre-Authenticated Request URL will display. By accessing this URL, you can download the VM instance image.

    download image

You can use this VM image to create a Virtual Machine outside OCI.

Acknowledgements

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.