---
title: "Create a machine image from a stopped VM"
method: POST
path: "/project/{project_id}/location/{location}/machine-image/{machine_image_reference}"
tags: ["Machine Image"]
---

# Create a machine image from a stopped VM

`POST /project/{project_id}/location/{location}/machine-image/{machine_image_reference}`

## Path parameters

- `machine_image_reference` string, required

## Request body

- object
  - `vm` string, required — UBID of the source VM
  - `version` string — Version label (default is a timestamp)
  - `destroy_source` boolean — Destroy the source VM after capture

## Response `200`

A machine image

- MachineImage
  - `id` string, required — ID of the machine image
  - `name` string, required — Name of the machine image
  - `location` string, required — Location of the machine image
  - `arch` 'x64' | 'arm64', required — Architecture
  - `latest_version` string, nullable — Latest version label
  - `created_at` string, date-time, required — Creation timestamp

## Other responses

- `default` — An error response

## Changes

- **2026-05-29** `5bb8dcd4ce12` — 7 info
  - removed `#/components/schemas/MachineImage, subschema #2` from the response body `allOf` list for the response status `200`
  - added the optional property `latest_version` to the response with the `200` status
  - added the required property `arch` to the response with the `200` status
  - added the required property `created_at` to the response with the `200` status
  - …3 more
- **2026-04-30** `b6ddb6f4553f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ubicloud/apis/clover-api/changes/project/:project_id/location/:location/machine-image/:machine_image_reference/post.md)

---

[API](https://skmtc.dev/ubicloud/apis/clover-api.md) · [All operations](https://skmtc.dev/ubicloud/apis/clover-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ubicloud/clover-api/revisions/ae229e5ccaee/schema)
