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

The Oracle-provided images are preconfigured to enable you to install and update packages from the repositories on the Oracle public Yum server. The repository configuration file is in the /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

Not Oracle Cloud at Customer 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

Not Oracle Cloud at Customer 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.

  1. Build your machine image. See Building Your Own Machine Images.
  2. 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.
  3. 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.
  4. (Optional) Create a bootable storage volume using the machine image. See Creating a Bootable Storage Volume.
  5. 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

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
  3. Click Upload Image.
  4. Enter your password, and then click Continue.
    The Upload Image page is displayed in a new tab.
  5. In the Image File field, browse to select the .tar.gz image file that you want to upload.
    The path where the image file will be uploaded and the size of the image are displayed.
  6. In the Target Object field, enter the name of the object that the image file should be stored as in Oracle Cloud Infrastructure Object Storage Classic.
    By default, this field is filled automatically with the name of the selected image file. You can use that name or enter a new name. The name must be unique and it must end with .tar.gz (example: myImage.tar.gz).
    Note this name. You’ll need it later when you want to add a machine image to Compute Classic using the POST /machineimage/ HTTP request or delete the image file from Oracle Cloud Infrastructure Object Storage Classic.
  7. Click Upload.

    Note:

    If an error message is displayed, check whether a replication policy has been selected for your Oracle Cloud Infrastructure Object Storage Classic instance. See Selecting a Replication Policy for Oracle Cloud Infrastructure Object Storage Classic in Using Oracle Cloud Infrastructure Object Storage Classic.

    If an image file already exists with the name specified in the Target Object field, you’re prompted to enter another name. If you proceed with the upload without changing the name, the existing image file is overwritten.
    The progress indicator shows the percentage of the upload operation that is complete. The time taken to upload the file varies depending the size of the image file. Do not close this browser window while the upload is still in progress.
    If you want to cancel the upload, click Cancel.

    After the file is uploaded to the compute_images container in Oracle Cloud Storage Service, a message is displayed to indicate that the image file was successfully uploaded. If you want to upload another image file, click Upload More.

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

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
  3. Click Associate Image.
  4. Enter a name and description for the new image, select the image file, and click Add.
You can now use your machine image to launch instances.

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.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
The Private Images page displays all the images that you’ve added.

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.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
  3. Go to the image that you want to update, and from the menu icon menu, select Update.
  4. In the Update Image dialog box, edit the description of the image. Enter a meaningful description that will help you to identify the image and its attributes easily. Click Update.

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

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
  3. Go to the image that you want to delete. Make a note of the image name. You might need this later, if you want to register the image again, or if you want to delete this image from your associated Oracle Cloud Infrastructure Object Storage Classic account.
  4. From the menu icon menu, select Delete.

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:

When you delete a machine image from Compute Classic, the image file that’s stored in Oracle Cloud Infrastructure Object Storage Classic is not removed.

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.