---
title: "Update OS image"
method: PATCH
path: "/api/v1/cvms/{cvm_id}/os-image"
tags: ["CVMs"]
---

# Update OS image

`PATCH /api/v1/cvms/{cvm_id}/os-image`

Upgrades the CVM to a different OS image. Shuts down, updates, and restarts. Takes several minutes. Track progress via correlation_id.

## Path parameters

- `cvm_id` string, required

## Request body

- BodyUpdateCvmOsImageApiV1CvmsCvmIdOsImagePatch
  - `os_image_name` string, required — Image name or slug from available-os-images

## Response `202`

Upgrade initiated, returns correlation_id

- unknown

## Other responses

- `400` — OS image not available for this CVM
- `401` — Authentication required
- `403` — CVM not in workspace
- `404` — CVM not found
- `409` — Another operation in progress
- `422` — Validation Error

---

[API](https://skmtc.net/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.net/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/versions/83c6ae62e860/schema)
