Compute / task

Create an image

Create your own image to launch more instances with the same software and configuration as one you’ve already set up. You snapshot the instance’s root disk, protect the snapshot, and create an image from it.

Before you begin

  • An instance whose root disk holds what you want in the image.
  • The origin CLI, signed in. See CLI access.

Prepare the instance

  1. Log in to the instance and clear its machine-id, so every instance launched from the image generates its own:

    Terminal window
    sudo truncate -s 0 /etc/machine-id
    sudo rm -f /var/lib/dbus/machine-id

    If you skip this, every instance from the image shares one machine-id, which breaks VXLAN networking between them. See Guest environment.

  2. Stop the instance, so the snapshot captures a cleanly shut-down file system. See Stop and start an instance.

Snapshot the root disk

  1. Find the root disk’s volume URN. In volumeAttachments, it’s the entry with isRootDevice set to true:

    Terminal window
    origin compute get-instance --instance-urn <instance-urn>
  2. Create a snapshot of that volume:

    Terminal window
    origin storage create-snapshot --volume-urn <volume-urn>
  3. Run get-snapshot until status reads COMPLETED. Note its volumeSizeInGib:

    Terminal window
    origin storage get-snapshot --snapshot-urn <snapshot-urn>
  4. Protect the snapshot. Only a protected snapshot can back an image:

    Terminal window
    origin storage protect-snapshot --snapshot-urn <snapshot-urn>
  5. Run get-snapshot until protectionStatus reads PROTECTED.

For more about snapshot states, see Create and protect a snapshot.

Create the image

  1. Create the image from the snapshot:

    Terminal window
    origin compute create-image \
    --project-urn <project-urn> \
    --root-device-snapshot-urn <snapshot-urn> \
    --root-device-size <size-gib> \
    --description "Web server base"
    • The snapshot must be in the project you create the image in. A snapshot of another project is refused as not found.
    • --root-device-size must be at least the snapshot’s volumeSizeInGib. It defaults to 8 GiB, so set it when the volume was larger. Instances launched from the image get a root disk of at least this size.
    • --default-user sets the account instances log in as. Omitted, it’s cloud. See Guest environment.
    • --root-device-name sets the guest device name of the root disk. It defaults to vda. Names run from vda to vdz, without /dev/, and vdc is reserved. Any other value is refused, naming the field.
  2. Verify the image. It reads status: AVAILABLE:

    Terminal window
    origin compute get-image --image-urn <image-urn>
  3. Launch an instance from it to test it. See Launch an instance.

With the API, createImage takes the root device as one of a list of blockDeviceSpecs, each with a deviceName, snapshotUrn and sizeInGib. rootDeviceName must name one of them.

Update or delete an image

The description is the only field you can change:

Terminal window
origin compute update-image \
--image-urn <image-urn> \
--description "Web server base, hardened"

To delete an image:

Terminal window
origin compute delete-image --image-urn <image-urn>

Deleting an image doesn’t affect instances already launched from it, because each has its own copy on its root disk. The snapshot behind the image isn’t deleted. Unprotect and delete it separately when you no longer need it. See Delete a snapshot.

You can update and delete only your own images, not platform-provided ones.

Origin Cloud — user documentation · last reviewed 2026-10-03 Legal notice Privacy policy