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 change a regular instance to a burstable instance, or change a burstable instance to a regular instance. You can also select a shape that uses a different processor. The instance's public and private IP addresses, volume attachments, and VNIC attachments remain the same.
The instance's current shape and image 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 the following shapes: VM.Standard1 series, VM.Standard.B1 series, VM.Standard2 series, VM.Standard3.Flex, VM.Standard.E2 series, VM.Standard.E3.Flex, VM.Standard.E4.Flex, and VM.Optimized3.Flex.
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 shapes in the VM.Standard2 series, you can change the shape to a new shape only within the same series.
- VM.Standard.A1.Flex: 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 or VM.GPU.GU1 (VM.GPU.A10) series.
- VM.GPU.GU1 (VM.GPU.A10) series: Can be changed to any shape in the VM.GPU.GU1 (VM.GPU.A10) or VM.GPU3 series.
These shapes cannot be changed:
- VM.GPU2 series
- VM instances that run on dedicated virtual machine hosts
Limitations and Considerations
Be aware of the following information:
- The image that was used to create 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 some regular 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
- If you want to change the instance to a smaller shape that supports fewer VNICs, detach the extra VNICs.
Using the Console
- Click the instance that you're interested in.
- Click More Actions, and then click Edit.
- Click Edit shape.
- In the Shape series section, select a processor group. The following options are available:
AMD: Standard shapes that use current generation AMD processors. The AMD shapes are flexible shapes.
Intel: Standard and optimized shapes that use current generation Intel processors. Includes flexible shapes.
Ampere: The Ampere A1 Compute shape, which uses current generation Arm-based processors. The Arm-based shape is a flexible shape.
- Specialty and previous generation: Standard and GPU shapes with previous generation Intel and AMD processors.
Select the shape that you want to scale to.
The instance's current shape and image determine which shapes you can select as a target for the new shape.
If you select a flexible shape, do the following:
- For Number of OCPUs, choose the number of OCPUs that you want to allocate to this instance by dragging the slider. The other resources scale proportionately.
- If you want this to be a burstable instance and the shape supports bursting, select the Burstable option. Then, in the Baseline utilization 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 each shape, see Flexible Shapes.
Click Save changes.
If the instance is running, it is rebooted. Confirm when prompted.
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: