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, it affects the number of OCPUs, amount of memory, network bandwidth, and maximum number of VNICs for the instance. Optionally, you can select a shape that uses a different processor. 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 Standard and Optimized shapes:

    Includes shapes in the VM.Optimized3, VM.Standard.E4, VM.Standard.E3, VM.Standard.E2, VM.Standard2, VM.Standard.B1, and VM.Standard1 series.

    For both Linux and Windows images, you can change the number of OCPUs and the amount of memory allocated to a flexible shape. You can also change a Standard shape in one series to a Standard shape in another series. For example, you can change a fixed shape to a flexible shape.

    Important

    • For Windows Server 2019 instances running on VM.Standard2 shapes, you can change the shape to a new shape only within the same series.
    • For Windows Server instances running on VM.Standard.E3 shapes, resize the shape to a maximum of 32 OCPUs. See this known issue for more information.
  • VM.Standard.A1 series: You can change the number of OCPUs and the amount of memory allocated.
  • 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.GPU2 series
  • VM instances that run on dedicated virtual machine hosts

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. Then, refer to the list of compatible shapes.
    • Using the API, call the ListShapes operation and pass the image OCID as a parameter.
  • Some Marketplace images cannot be resized because of licensing constraints. If you want to resize a Microsoft SQL Server image, contact support.
  • You must have sufficient service limits for the new shape. If you don't have service limits, the instance will remain with the original shape.
  • Different shapes are billed at different rates. When you change the shape of an instance, you are billed to the nearest second of usage for each shape that you use. 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.
  • If you created a regular instance using SR-IOV networking (the default for VM.Standard.E3.Flex instances), and want to change the instance to a burstable instance, you must also change the networking type to paravirtualized.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be granted security access in a policy  by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment  to 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.

Prerequisites

Using the Console

  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click Edit.
  4. Click Edit Shape. Then, select the shape that you want to scale to. The following options are available:
    • AMD: The flexible shapes that use current generation AMD processors and have a customizable number of OCPUs and amount of memory.
      • For Number of OCPUs, choose the number of OCPUs that you want to allocate to this instance by dragging the slider. You can select from 1 to 64 OCPUs.
      • If you want this to be a burstable instance, select the Burstable check box. Then, in the Burstable baseline per OCPU list, select the baseline OCPU utilization for the instance. This value is the percentage of OCPUs that you want to use most of the time.
      • For Amount of memory (GB), choose the amount of memory that you want to allocate to this instance by dragging the slider. The amount of memory allowed is based on the number of OCPUs selected. For more information about the minimum memory, maximum memory, and ratio of memory to OCPUs for this shape, see Flexible Shapes.
      The other resources scale proportionately.
    • Intel: Standard and optimized shapes that use current generation Intel processors. Optimized flexible shapes have a customizable number of OCPUs and amount of memory.
      • For Number of OCPUs, choose the number of OCPUs that you want to allocate to this instance by dragging the slider. You can select from 1 to 18 OCPUs.
      • For Amount of memory (GB), choose the amount of memory that you want to allocate to this instance by dragging the slider. The amount of memory allowed is based on the number of OCPUs selected. For more information about the minimum memory, maximum memory, and ratio of memory to OCPUs for this shape, see Flexible Shapes.
      The other resources scale proportionately.
    • Specialty and Previous Generation: Standard shapes with previous generation Intel and AMD processors.
  5. Click Change Shape.

    If the instance is running, it is rebooted.