Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
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
- Create the Object Storage where the image will be stored.
- Read the limitations and considerations of creating custom images: Limitations and Considerations.
Task 1: Create custom image of the VM instance
-
Open the instance details page on the console of which you want to create the image.
-
Click More actions.
-
Click Create custom image.
-
Enter the custom image name and click Create custom image. System will be taken offline for several minutes during this imaging process.
Note: Instance will be offline for some time and you can see the status CREATING IMAGE in the console.
Task 2: Download VM instance image for using outside OCI
-
Open the created custom image page on console and click Export.
-
Select the Export to an Object Storage bucket option.
-
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)
-
Click Export image.
You can see the status of the custom image as EXPORTING.
-
-
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.
-
Select Pre-Authenticated Request Target as Object, Access Type as Permit object reads and enter the Expiration date of Pre-Authenticated Request URL.
-
Click Create Pre-Authenticated Request. The Pre-Authenticated Request URL will display. By accessing this URL, you can download the VM instance image.
You can use this VM image to create a Virtual Machine outside OCI.
Related Links
- Platform Images
- Launch virtual machine instances
- Virtual Machine Instances
- Custom Images
- Object Storage
- Pre-Authenticated Requests
Acknowledgements
- Author - Nikhil Khandelwal (Enterprise Cloud Architect)
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.
Create and download a virtual machine image for using outside OCI
F78239-01
February 2023
Copyright © 2023, Oracle and/or its affiliates.