8 Managing Machine Images
A machine image is a template of a virtual hard disk of a specific size with an installed operating system. You use machine images to create virtual machine instances in Compute Classic.
You can create instances by using either your own machine images or images provided by Oracle.
About Oracle-Provided Linux Images
Releases
Oracle provides images for the following x86, 64-bit releases of Oracle Linux:
- 5.3
- 5.11 UEK R2
- 6.4 UEK R3 and UEK R4
- 6.6 UEK R3 and UEK R4
- 6.7 UEK R3 and UEK R4
- 6.8 UEK R3 and UEK R4
- 7.1 UEK R3 and UEK R4
- 7.2 UEK R3 and UEK R4
Each image list might contain multiple versions of an image. From release 16.3.6, the release number is included in the name of the image. Whenever possible, use the latest version of an image. When you create an instance, the web console selects the most recent version of an image by default. If required, you can select an older version.
The Oracle-provided images include the essential packages that are necessary to get started using the instance that you create in Compute Classic.
For more information about available images, see the Compute Classic FAQ.
Users
In instances created by using any of the Oracle-provided Oracle Linux images, a user named opc
is preconfigured. The opc
user has sudo
privileges and is configured for remote access over the SSH v2 protocol using RSA keys. The SSH public keys that you specify while creating instances are added to the /home/opc/.ssh/authorized_keys
file.
Note that root
login is disabled.
Remote Access
Access to the instance is permitted only over the SSH v2 protocol. All other remote access services are disabled.
OS Updates
/etc/yum.repos.d
directory on your instance. You can install, update, and remove packages by using the yum
utility.
Note:
Oracle-provided images are updated regularly with the necessary patches. But after creating instances using the Oracle-provided images, you’re responsible for applying the required security updates published through the Oracle public Yum server.Language Support
Arabic, Chinese - Simplified, Chinese - Traditional, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese - Brazilian, Romanian, Russian, Slovak, Spanish, Swedish, Thai, Turkish
About Oracle-Provided Solaris Images
This topic does not apply to Oracle Cloud at Customer.
Releases
Oracle provides machine images for Oracle Solaris 11.3 (x86, 64-bit).
The Oracle-provided images include the essential packages for getting started using the instance that you create in Compute Classic. These images are updated according to Oracle's quarterly critical patch update schedule.
Note:
Oracle Solaris Kernel Zones are not supported. The only virtualization that’s supported within Oracle Solaris instances in Compute Classic is native non-global zones and Oracle Solaris 10 Zones.
See Workflow for Creating Your First Oracle Solaris Instance.
Users
In instances created by using any of the Oracle-provided Oracle Solaris images, a user named opc
is preconfigured. The opc
user is assigned the System Administrator profile and can perform basic administration tasks without entering a password by using pfexec
. The opc
user is configured for remote access over the SSH v2 protocol using RSA keys. The SSH public keys that you specify while creating instances are added to the /export/home/opc/.ssh/authorized_keys
file.
Note:
Direct login as root
is disabled. You can assume the root
role by running su -
. The password is solaris_opc
and is marked as expired. You must change the password the first time that you assume the root
role.
Disk Layout
The images include a single disk that’s mapped to the root ZFS storage pool (rpool
).
Support and Package Updates
When you create instances by using an Oracle-provided Oracle Solaris image, you get a support entitlement for Oracle Solaris. You can update packages from the support repository, file service requests to get support, and so on. The default IPS publisher, named solaris
, is preconfigured to use the Oracle Solaris support repository (https://pkg.oracle.com/solaris/support/
).
Language Support
See Managing Available Locales in International Language Environments Guide for Oracle Solaris 11.3.
About Oracle-Provided Windows Images
This topic does not apply to Oracle Cloud at Customer.
Releases
Oracle provides machine images in Oracle Cloud Marketplace for Microsoft Windows Server (x86, 64-bit) releases 2012 R2 Standard Edition and 2008 R2 Standard Edition. See Workflow for Creating Your First Windows Instance.
Licensing Requirements
When you obtain a Windows image from Oracle Cloud Marketplace, the terms and conditions for using the image are displayed. You must read and accept those terms.
Users
On instances created by using any of the Oracle-provided Windows images, a user named Administrator
is created automatically. This user is configured for accessing the instance through a remote desktop protocol (RDP) connection. You must set the password for this user while creating the instance.
Remote Access
Access to the instance is permitted only over RDP. All other remote access services are disabled.
Disk Layout
The images contain a single disk that’s mapped to the C
drive.
Language Support
English only.
Workflow for Creating Instances Using a Private Machine Image
You can create instances in Compute Classic by using either Oracle-provided machine images or your own custom machine images. In either case, you can set up the instances to boot from a persistent disk. This workflow summarizes the high-level steps for building a custom machine image, adding it to Compute Classic, and using that machine image to create instances.
- Build your machine image. See Building Your Own Machine Images.
- Upload the
tar.gz
machine image file to Oracle Cloud Infrastructure Object Storage Classic. See Uploading Image Files to Oracle Cloud Infrastructure Object Storage Classic. - Create a machine image in Compute Classic corresponding to the machine image file stored in Oracle Cloud Infrastructure Object Storage Classic. See Registering a Machine Image in Compute Classic.
- (Optional) Create a bootable storage volume using the machine image. See Creating a Bootable Storage Volume.
- Create instances. See Creating Instances.
Uploading Image Files to Oracle Cloud Infrastructure Object Storage Classic
After building your private images, to use the images to launch instances in Compute Classic, you must first upload the image files to Oracle Cloud Infrastructure Object Storage Classic.
Oracle Cloud Infrastructure Object Storage Classic provides an enterprise-grade, large-scale, object storage solution for files and unstructured data.
(Not available on Oracle Cloud at Customer) When your Compute Classic account was activated, an Oracle Cloud Infrastructure Object Storage Classic instance would have been provisioned automatically.
To access Oracle Cloud Infrastructure Object Storage Classic in Oracle Cloud at Customer, you'll need a separate subscription to the service.
Note:
For information about the operating systems that you can use to build machine images, see Guidelines for Building Private Images.
Tip:
You can also upload image files to Oracle Cloud Storage Service by using the uploadcli
tool. With this tool, you can upload multiple files by using a single command. See the Uploading a Machine Image to Oracle Cloud Infrastructure Object Storage Classic tutorial.
Prerequisites
-
Make sure that the
.tar.gz
file that you want to upload is available on the host from which you’re accessing the Compute Classic web console. -
Make sure that you have the required role to upload images to Oracle Cloud Infrastructure Object Storage Classic.
-
If this is the first image being uploaded to Oracle Cloud Infrastructure Object Storage Classic, then you must have the
Storage Administrator
role. -
If one or more images have previously been uploaded to Oracle Cloud Infrastructure Object Storage Classic, then any user with the
Storage_ReadWriteGroup
role can upload images.
If you don’t have the required role or aren’t sure, then ask your service administrator to ensure that you have the required role in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
-
-
Make sure that a replication policy has been set for your Oracle Cloud Infrastructure Object Storage Classicinstance. See Selecting a Replication Policy for Oracle Cloud Infrastructure Object Storage Classic in Using Oracle Cloud Infrastructure Object Storage Classic.
Procedure
To launch instances using the image files that you uploaded to Oracle Cloud Infrastructure Object Storage Classic, you must register the machine images in Compute Classic. See Registering a Machine Image in Compute Classic.
Tip:
By default, any user in your Oracle Cloud Infrastructure Object Storage Classic account who has the Storage_ReadWriteGroup
role has full read and write access to the compute_images
container in which you store image files. To restrict access to the compute_images
container, create a custom role in Oracle Cloud Infrastructure Classic Console, assign that role to only the users who must be allowed to access the compute_images
container, and then assign the role to the X-Container-Write
ACL of the container. See the Restrict Read and Write Access to Containers by Using the REST API tutorial.
Registering a Machine Image in Compute Classic
You can create your own machine images, register them in Compute Classic, and then use the images to launch instances.
Note:
For information about the operating systems that you can use to build machine images, see Guidelines for Building Private Images.
Prerequisites
-
To complete this task, you must have the
Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud. - You must have uploaded the machine image file to Oracle Cloud Infrastructure Object Storage Classic. See Uploading Image Files to Oracle Cloud Infrastructure Object Storage Classic.
Procedure
To do this using the CLI, use the opc compute machine-image add
, opc compute image-list add
, and opc compute image-list-entry add
commands, in that order. For help with these commands, run each command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To do this using the API, invoke the POST /machineimage/
, POST /imagelist/
, and POST /imagelistentry/
methods, in that order. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Listing Machine Images
A machine image can be either an Oracle-provided image or a private image that you added.
Listing Oracle-Provided Images
When you create instances by using the web console, the Oracle Images tab on the Image page lists all the Oracle-provided images.
To get a list of Oracle-provided machine images using the CLI, use the opc compute machine-image list
command with /oracle/public
as the container . For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To get a list of Oracle-provided machine images using the API, use the GET /machineimage/oracle/public
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Listing Private Images
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
To get a list of private machine images using the CLI, use the opc compute machine-image list
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To get a list of private machine images using the API, use the GET /machineimage/Compute-account/user
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Updating a Private Machine Image
After you’ve registered a private machine image in Compute Classic, if required, you can update the description of the machine image.
To complete this task, you must have the Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
To update an image using the CLI, use the opc compute image-list update
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To update an image description using the API, use the PUT /imagelist/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Deleting a Private Machine Image
When you no longer need a private machine image that you’ve registered in Compute Classic, you can delete the image. Deleting an image removes the image from your Compute Classic account. However, the image file in your Oracle Cloud Infrastructure Object Storage Classic account isn’t deleted. You can register this image in your Compute Classic account again later, if required.
Prerequisites
-
To complete this task, you must have the
Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud. -
Make sure that the machine image isn’t used in any orchestration.
Caution:
If you delete a machine image that’s used in an orchestration, then when that orchestration is stopped and re-started, the instances won’t be created.
Procedure
To delete an image using the CLI, use the opc compute machine-image delete
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To delete an image using the API, use the DELETE /machineimage/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Note:
-
At any time, you can register the machine image again in Compute Classic and then use the image to launch instances.
-
For instructions to permanently remove a machine image file from Oracle Cloud Infrastructure Object Storage Classic, see the Deleting Machine Image Files from Oracle Cloud Infrastructure Object Storage Classic tutorial.
Maintaining Versions of Private Machine Images
You can group multiple versions or flavors of machine images that you build, using image lists. An image list is a collection of Compute Classic machine images. Each machine image in an image list is identified by a unique entry number. Image lists enable you to administer and use related machine images easily.
Note:
For information about the operating systems that you can use to build machine images, see Guidelines for Building Private Images.
For example, you can group multiple versions of an Oracle Linux 6.6 machine image, each containing a different set of packages, in an image list. To view the details of all your Oracle Linux 6.6 image versions, all you need to do is view the details of the image list that contains those images. In an orchestration, you can quickly change the machine image that must be used, say from one Oracle Linux 6.6 image version to another, by simply changing the imagelist_entry
number.
When you add a machine image using the web console, an image list is created automatically by using the name that you specified for the image. The new machine image becomes the default (and only) entry in the image list.