Oracle Cloud Infrastructure Documentation

Creating Windows Custom Images

You can create a Windows custom image of a bare metal or VM instance's 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. For information about using the Console to manage custom images, see Managing Custom Images.

Windows supports two kinds of images: generalized and specialized. Generalized images are images that have been cleaned of instance-specific information. Specialized images are point-in-time snapshots of the boot disk of a running instance, and are useful for creating backups of an instance. Oracle Cloud Infrastructure supports bare metal and VM instances launched from both generalized and specialized custom Windows images.

Generalized images

A generalized image has a generalized OS disk, cleaned of computer-specific information. The images are generalized using Sysprep. Generalized images can be useful in scenarios such as quickly scaling an environment. Generalized images can be configured to preserve the existing opc user's account, including the password, at the time the image is created, or configured to recreate the opc user account, including generating a new, random password that you retrieve using the API.

Specialized images

A specialized image has an OS disk that is already fully installed, and is essentially a copy of the original bare metal or VM instance. Specialized images are intended to be used for backups so that you can recover from a failure. Specialized images are useful when you are testing a task and may need to roll back to known good configuration. Specialized images are not recommended for cloning multiple identical Bare Metal instances or VMs in the same network because of issues with multiple computers having the same computer name and ID. When creating a specialized image, you must remember the opc user's password; a new password is not generated when the instance launches, and it cannot be retrieved from the console or API.

Creating a Generalized Image


Creating a generalized image from an instance will render the instance non-functional, so you should first create a custom image from the instance, and then launch a new instance from the custom image. Steps 1 - 2 describe how to do this. This is the instance that you'll generalize. Alternatively, you can make a backup image of the instance that you can use to launch a replacement instance if needed.


If you upgrade to PowerShell 5.0/WMF 5.0, you may encounter an issue where Sysprep fails which will prevent the image generalization process from completing. If this occurs, you may not be able to log into instances launched from the custom image. See Unable to log into instance launched from new generalized Windows custom image for more information and how to workaround the issue.

  1. Create the new image using To create a custom image.
  2. Launch an instance from the new image using To launch an instance from a custom image.
  3. Connect to the instance using a Remote Desktop client.
  4. Go to Windows Generalized Image Support Files and download to the instance the file matching the Windows version for the instance.

    For X7 instances:

    • Windows Server 2016 Datacenter and Windows Server 2012 Standard R2: Oracle Cloud Infrastructure - Windows Server Generalize-2018-02-28-Gen2.SED.EXE

    For X5 instances:

    • Windows Server 2012 Standard R2: Oracle Cloud Infrastrucure - Windows 2012 R2 Generalize-2017-04-12.SED.EXE
    • Windows Server 2008 R2: Oracle Cloud Infrastructure - Windows 2008 R2 Generalize-2017-08-03.SED.EXE
  5. Right-click the file, and then click Run as administrator.
  6. Extract the files to C:\Windows\Panther. The following files are extracted into the Panther folder for all Windows Server versions:
    • Generalize.cmd
    • Specialize.cmd
    • unattend.xml
    • Post-Generalize.ps1

    For Windows Server 2008, the following file is also extracted into the Panther folder:

    • Windows2008-SnapshotUtilities.ps1
  7. Optional: If you want to preserve the opc user account, edit C:\Program Files\bmcs\imageType.json and change the imageTypesetting to custom. A new password is not created and the password is not retrievable from the console or API.

    If you want to configure the generalized image to recreate the opc user account when a new instance is launched from the image, leave the imageType setting defaulted to general. The new account's password can be retrieved through the API using GetWindowsInstanceInitialCredentials.

  8. Right-click Generalize.cmd, and then click Run as administrator. Keep in mind the following outcomes of running this command:

    • Your connection to the Remote Desktop client may immediately be turned off and you will be logged out of the instance. If this does not occur, you should log out of the instance yourself.
    • Because sysprep generalize turns off Remote Desktop, you won't be able to log in to the instance again.
    • Creating a generalized image essentially destroys the instance's functionality.

    You should wait for a few minutes before proceeding to step 9 to ensure the generalization process has completed.

  9. Create the new image using To create a custom image.
  10. After you create an image from an instance that has been generalized, Oracle recommends that you terminate that instance. Although it may appear to be running, it won't be fully operable.

Creating a Specialized Image


When creating a specialized image, you must remember the opc user's password. It cannot be retrieved from the Console or API.

You create a specialized image the same way you create other custom images. For step-by-step instructions, see Managing Custom Images.