Skip to content

Compute / Task

Change an instance's type

Updated · 2 min read

Change a stopped instance to a different instance type so it starts again with more or fewer vCPUs and memory, keeping its identity and volumes.

On this page5 sections

Change an instance’s type to resize it, or to move it off a type that is no longer offered. Only the size changes. The instance keeps its URN, its addresses and its volumes.

Before you begin

Change the type

  1. Stop the instance if it’s running. See Stop and start an instance.

  2. Pick a type whose available is true:

    terminal
    origin compute list-instance-types
  3. Change the type:

    terminal
    origin compute change-instance-type \
      --instance-urn <instance-urn> \
      --instance-type gp1.core.4
  4. Verify the change. instanceType on the instance now reads the new type:

    terminal
    origin compute get-instance --instance-urn <instance-urn>
  5. Start the instance:

    terminal
    origin compute start-instance --instance-urn <instance-urn>

Using the API

GraphQL
mutation {
  compute {
    changeInstanceType(input: {
      instanceUrn: "<instance-urn>"
      instanceType: "gp1.core.4"
    }) {
      accepted
      message
    }
  }
}

If this fails

  • PRODUCT_UNAVAILABLE: the type you named is no longer offered. Pick one whose available is true. See Instance types.
  • Quota exceeded: the larger type would take the organization or project past its vCPU limit. Choose a smaller type or request a higher limit.
  • The instance isn’t stopped: stop it first and wait for STOPPED.