Resize VMs

This guide shows you how to change the resource profile (CPU and memory) of an existing virtual machine.

Prerequisites

  • An existing VM
  • evroc CLI installed and configured

Stop the VM

You must stop the VM before changing its resource profile.

evroc compute virtualmachine update myvm --running=false

Wait for the VM to stop. Verify the status:

evroc compute virtualmachine get myvm

Change the resource profile

Update the VM to use a different resource profile:

evroc compute virtualmachine update myvm \
  --vm-virtual-resources-ref=a1a.m

Important: You can only change the resource profile when the VM is stopped.

Warning: Resizing a VM to a smaller resource profile is possible but not recommended. The VM may become unstable or fail to boot if it doesn't have sufficient resources for its workload or operating system.

Start the VM

The VM picks up the new resource profile when it starts:

evroc compute virtualmachine update myvm --running=true

Verify the VM is running with the new profile:

evroc compute virtualmachine get myvm

Next steps