Oracle Cloud Infrastructure Documentation

Changing the Shape of an Instance

You can change the shape of a virtual machine (VM) instance without having to rebuild your instances or redeploy your applications. This lets you scale up your Compute resources for increased performance, or scale down to reduce cost.

When you change the shape of an instance, you select a different processor, number of cores, amount of memory, network bandwidth, and maximum number of VNICs for the instance. The instance's public and private IP addresses, volume attachments, and VNIC attachments remain the same.

Supported Shapes

The shape series and image of the original shape determine which shapes you can select as a target for the new shape. You can resize instances that use these shapes:

  • VM.Standard2, VM.Standard.B1, and VM.Standard1 series:

    • For Linux images, the shape can be changed to any shape in the VM.Standard2, VM.Standard.B1, or VM.Standard1 series.
    • For Windows images, the shape can be changed to a new shape only within the same series. For example, you can change a VM.Standard2.1 shape to a VM.Standard2.2 shape, but you can't change a VM.Standard2.1 shape to a VM.Standard1.1 shape.
  • VM.Standard.E2 series: Can be changed to any shape in the VM.Standard.E2 series.
  • VM.GPU3 series: Can be changed to any shape in the VM.GPU3 series.

These shapes cannot be changed:

  • VM.Standard.E2.1.Micro series
  • VM.DenseIO1 series
  • VM.DenseIO2 series
  • VM.GPU2 series
  • VM instances that run on dedicated virtual machine hosts
  • Bare metal shapes

Limitations and Considerations

Be aware of the following information:

  • The image that's used to launch the instance must be compatible with the new shape. To see which shapes are compatible, do either of the following things: In the Console, on the Instance Details page, click the name of the image, and then refer to the list of compatible shapes. Or, using the API, call the ListShapes operation and pass the image OCID as a parameter. Some Marketplace images (such as Microsoft SQL Server) cannot be resized because of licensing constraints.
  • You must have sufficient service limits for the new shape.
  • Different shapes are billed at different rates. When you resize within the same series, you are billed for the largest shape that you use in the hour. When you resize across series, you are billed for the largest shapes that you use in the hour, in both the original series and the new series. For more information, see Compute Pricing and Resource Billing for Stopped Instances.
  • If the instance has secondary VNICs configured, you might need to reconfigure them after the instance is rebooted. For more information, see Virtual Network Interface Cards (VNICs).
  • If the instance is running when you change the shape, it is rebooted as part of the change shape operation. If the applications that run on the instance take a long time to shut down, they could be improperly stopped, resulting in data corruption. To avoid this, shut down the instance using the commands available in the OS before you change the shape.
  • When you change the shape from one hardware series to a different series, some hardware details such as the network interface name might change. This might cause problems for some guest OSs, particularly if the OS has been customized. If the OS fails to boot after you change the shape, then you should change the instance back to the original shape.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be given the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment  you should work in.

For administrators: The policy in Let users launch Compute instances includes the ability to change the shape of an instance. If the specified group doesn't need to launch instances or attach volumes, you could simplify that policy to include only manage instance-family, and remove the statements involving volume-family and virtual-network-family.

If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services.


Using the Console

  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.

  2. Click the instance that you're interested in.
  3. Click Actions, and then click Change Shape.
  4. Select the check box next to the shape that you want to scale the instance to. Only the compatible shapes appear in the list.
  5. Click Change Shape.

    If the instance is running, it is rebooted as part of the change shape operation.

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use this API operation to change the shape of an instance: