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.
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.E2, VM.Standard2, VM.Standard.B1, and VM.Standard1 series:
- For Linux images, the shape can be changed to any fixed shape in the VM.Standard.E2, VM.Standard2, VM.Standard.B1, or VM.Standard1 series. The shape can also be changed to the VM.Standard.E3 series flexible shape.
- 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.E3 series: You can change the number of OCPUs and the amount of memory allocated to a VM.Standard.E3 series flexible shape. For Linux images, a flexible shape can also be changed to any fixed shape in the VM.Standard.E2, VM.Standard2, VM.Standard.B1, or VM.Standard1 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. 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.
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 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
- If you want to change the instance to a smaller shape that supports fewer VNICs, detach the extra VNICs.
Using the Console
Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
- Click the instance that you're interested in.
- Click Edit.
- Click Edit Shape. Then, select the shape that you want to scale to. The
following options are available:
AMD Rome: The flexible shapes, which uses the current generation AMD processor and has 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.
- 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 each OCPU, you can select up to 64 GB of memory, with a maximum of 1024 GB total. The minimum amount of memory allowed is either 1 GB or a value matching the number of OCPUs, whichever is greater. For example, if you select 25 OCPUs, the minimum amount of memory allowed is 25 GB.
- Intel Skylake: Standard shapes that use the current generation Intel processor and have a fixed number of OCPUs.
- Specialty and Legacy: Standard shapes with previous generation Intel and AMD processors.
Click Change Shape.
If the instance is running, it is rebooted.
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: