Skip to navigation

Resize a VM

Resizing moves a VM to a different plan without rebuilding it. It lets you add or remove vCPUs and memory, and make the root disk bigger. Your files, IP address, SSH keys and attached volumes stay as they are. The VM is switched off while the change is applied and switched back on automatically.

When to use a resize

Your problemBest fix
CPU or memory is often close to 100% on the Monitoring tabResize to a bigger plan (this page)
The VM is mostly idle and you want to pay lessResize to a plan with fewer vCPUs or less memory and the same or a bigger disk
Only your data is growingAttach a Block Storage volume. It’s cheaper than a bigger plan and the VM keeps running.
You need a smaller diskCreate a new VM on the smaller plan and copy your data. Disks can’t shrink.

How it works

  1. You pick a new plan. The portal runs a pre-check that says whether the change can be made in place.
  2. A running VM is stopped. The new vCPU and memory are applied, and the root disk is grown if the new plan’s disk is bigger.
  3. The VM starts again automatically. A VM that was already stopped stays stopped.
  4. Billing moves to the new plan’s rate from that moment. Your bill shows the old plan and the new plan as separate lines, with no overlap.

Before you begin

  • Take a snapshot first. A resize restarts the VM; a snapshot lets you go back if something goes wrong.
  • You need write access to the workspace. Read-only members see the current plan but not Change Plan.
  • The VM must be Running or Stopped, with no other operation in progress.
  • A VM on a Monthly commitment can’t be resized until the commitment ends.
  • Plan for a short outage: running applications stop while the VM restarts.

Resize in the portal

1

Open Change Plan

On the VM’s page, open the Settings tab. Change Plan is selected. The Current Plan card shows the VM’s vCPU, RAM and disk.

2

Pick a plan

Open Available Upgrades and select a plan. Each entry shows its vCPU, RAM and disk. A Selected Plan summary confirms the new size, and Billing term lets you choose the term for the new plan.

3

Read what will happen

The portal shows one of three panels:

Target planPanelButton
More vCPU, RAM or diskUpgrade Process: the server is briefly stopped, upgraded, restarted automatically, and billed at the new rate.Upgrade Plan
Fewer vCPU or less RAM, same or bigger diskDowngrade Process: the server is stopped, CPU and RAM are adjusted, the disk stays the same size, and the server restarts.Downgrade Plan
A smaller diskDowngrade Not Possible: “Disk shrinking is not supported as it risks data loss.”None
4

Run the pre-check

Click Upgrade Plan or Downgrade Plan. The button shows Verifying… while the pre-check runs. If the change can’t be made in place, Resize not possible lists the reasons.

5

Confirm

The Confirm Resize dialog shows the current and target vCPU, RAM and disk, and a Downtime notice:

  • Running VM: “The VM will be stopped, resized, and started automatically.”
  • Stopped VM: “The VM is currently stopped. Resize will be applied without auto-start.”

Click Confirm Resize. The VM’s status shows Resizing, then Running (or Stopped).

Resize with the CLI or API

A resize moves the VM to another plan. Pick the target plan in ibee compute plans --vm-type cloud (GET /compute/plans?vm_type=cloud) and send its cpu, ram_mb and disk_gb exactly as listed, plus its billing_catalog with the billing term you want merged in, as on create. The pre-check needs only the size.

# Check first: is an in-place resize possible?
ibee vms resize-precheck VM_ID --cpu 4 --ram-mb 8192 --disk-gb 80
# Resize to plan PLAN_ID, billed hourly; the command prints an operation_id
ibee vms resize VM_ID --cpu 4 --ram-mb 8192 --disk-gb 80 --plan-id PLAN_ID --billing-interval HOURLY
ibee ops get OPERATION_ID

--billing-interval HOURLY (or MONTHLY) reads the --plan-id plan from GET /compute/plans and sends its billing_catalog with that billing term merged in. You can pass the whole selection yourself with --billing-catalog JSON instead. These options need CLI 0.8.0 or later; 0.7.0 and earlier can’t resize.

With the API, check first, then resize. The resize also needs an X-Idempotency-Key. Build billing_catalog from the target plan in GET /compute/plans: copy the plan’s billing_catalog and merge in the whole billing_options entry for the term you want (billing_interval, committed, commitment_period, unit_price_minor and the rest), keeping price_currency:

curl -X POST "https://api.ibee.ai/v1/compute/cloud-vms/VM_ID/actions/resize/precheck?workspace_id=$IBEE_WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"cpu": 4, "ram_mb": 8192, "disk_gb": 80}'
curl -X POST "https://api.ibee.ai/v1/compute/cloud-vms/VM_ID/actions/resize?workspace_id=$IBEE_WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: $(uuidgen)" \
-d @resize.json

where resize.json is the target plan’s size and billing selection:

{
"cpu": 4,
"ram_mb": 8192,
"disk_gb": 80,
"billing_catalog": {
"sku_id": "SKU_ID_FROM_THE_PLAN",
"sku_code": "PERFORMA-4-8-80",
"billing_interval": "HOURLY",
"committed": false,
"commitment_period": "HOURLY",
"unit_price_minor": 0,
"price_currency": "INR"
}
}

Copy every value from the plan rather than typing it: the server checks the selection against its catalog. The example’s unit_price_minor is a placeholder.

The pre-check returns a decision of in_place, migration_required or blocked, with reasons and warnings. The resize returns 202 and an operation_id; poll GET /compute/operations/{operation_id} until status is succeeded. GPU VMs use the same paths under /compute/gpu-vms, with --vm-type gpu plans; the GPU model stays the same.

Verify

Sign in to the VM and check the new size:

nproc # number of vCPUs
free -h # memory
df -h / # root filesystem size

On IBEE’s Linux images, the root partition and filesystem grow automatically at boot, so df -h / shows the new size straight away.

What changes and what stays

After a resize
vCPU and memoryThe new plan’s values
Root diskGrows to the new plan’s size on an upgrade; keeps its size on a CPU/RAM downgrade. Never shrinks.
Data on the diskKept
Public IP, private IPs, hostname, SSH keysKept
Attached volumesKept and still attached
Snapshots and backupsKept
PriceThe new plan’s rate, from the moment the resize finishes

If the disk didn’t grow (Linux)

Images you built yourself may not grow the filesystem on their own. Grow it by hand:

lsblk # find the root disk and partition, usually vda and vda1
sudo growpart /dev/vda 1 # grow partition 1 to fill the disk
sudo resize2fs /dev/vda1 # ext4 filesystems
sudo xfs_growfs / # XFS filesystems (use this instead of resize2fs)

On Windows, open Disk Management, right-click the C: volume and choose Extend Volume.

Moving to a smaller disk

You can’t shrink a disk in place. To move to a plan with a smaller disk:

  1. Create a VM on the smaller plan.
  2. Copy your data to it, for example with rsync.
  3. Point your DNS records at the new VM’s IP address, check it works, and delete the old VM.

Limits

Value
DiskCan only grow. Plan root disks range from 50 GB to 400 GB.
VM stateRunning or Stopped, with no other operation running
DowntimeThe VM restarts once. A stopped VM isn’t started.
Monthly commitmentNo resize until the commitment ends
GPU VMsChange Plan changes vCPU, memory and disk. The GPU model stays the same.

Troubleshooting

You seeWhat it meansWhat to do
No alternative plans available for this region.There’s no other plan in the VM’s locationCheck Instance types, or create a new VM elsewhere.
Downgrade Not PossibleThe target plan’s disk is smaller than the current diskPick a plan with the same or a bigger disk, or follow Moving to a smaller disk.
Resize not possible with “In-place root disk shrink is not supported.”Same as above, from the pre-checkAs above.
Resize not possible with “VM is currently in ’…’ state; resize requires running or stopped.”Another operation is running, or the VM is in ErrorWait for the VM to show Running or Stopped, then try again.
400 “Plan changes require the target billing_catalog (sku_id and sku_code)“The API resize was sent without billing_catalogAdd the target plan’s billing_catalog with a billing term merged in. See Resize with the CLI or API.
400 “Target billing SKU dimensions do not match requested CPU, RAM and root disk”cpu, ram_mb or disk_gb differs from the plan in billing_catalogSend the plan’s exact values from GET /compute/plans.
”Requested values match current VM resources.”The target size is the same as the current onePick a different plan.
Resizing isn’t available while this VM is on a monthly commitment.The VM is committed until the end of the monthWait until the commitment ends, or contact support. The API answers 409 with code VM_COMMITTED.
df -h / still shows the old sizeThe image doesn’t grow its filesystem at bootRun the commands in If the disk didn’t grow.
The resize failedThe operation stopped part-wayCheck Activity logs for the reason, then retry or contact support.