---
title: "Create a VM"
method: POST
path: "/vms"
tags: ["vms"]
---

# Create a VM

`POST /vms`

## Response `200`

VM resource was successfully created

- VM
  - `name` string — VM name
  - `resources` object — Dictionary that maps the resource name to the amount of this resource required on the worker for this VM to be scheduled
  - `hostDirs` object[]
    - `name` string
    - `path` string
    - `ro` boolean

## Other responses

- `409` — VM resource with with the same name already exists

## Changes

- **2023-10-09** `e0632c7e52ea` — 1 breaking, 3 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - added the optional property `hostDirs` to the response with the `200` status
  - added the optional property `name` to the response with the `200` status
  - added the optional property `resources` to the response with the `200` status
- **2023-01-26** `4b9547159dde` — 2 breaking, 1 info
  - removed the request body
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed `#/components/schemas/VMMeta, #/components/schemas/VMSpec, #/components/schemas/VMState` from the response body `allOf` list for the response status `200`

[Change history](https://skmtc.dev/openai/apis/orchard/changes/vms/post.md)

---

[API](https://skmtc.dev/openai/apis/orchard.md) · [All operations](https://skmtc.dev/openai/apis/orchard/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openai/orchard/revisions/9d2bc7a08ffc/schema)
