---
title: "Create a test vm."
method: POST
path: "/vm"
tags: ["vms"]
---

# Create a test vm.

`POST /vm`

Required RBAC Policy: kots/vm/create

## Query parameters

- `DryRun` boolean

## Request body

- CreateVMParametersBody
  - `count` integer
  - `disk_gib` integer
  - `distribution` string
  - `instance_type` string
  - `name` string
  - `network_id` string
  - `public_keys` string[]
  - `tags` Tag[]
    - `key` string
    - `value` string
  - `ttl` string
  - `version` string

## Response `200`

CreateVMDryRunResponse contains the response to a dry run of creating a vm

- object
  - `error` CreateVMError
    - `maxDiskGiB` integer
    - `maxMemoryGiB` integer
    - `maxVCPUs` integer
    - `message` string
    - `validationError` VMValidationError
      - `errors` string[]
      - `supported_distributions` VMSupportedDistributionAndVersions[]
        - `instance_types` string[]
        - `short_name` string
        - `status` VMDistributionStatus
          - `enabled` boolean
          - `status` string
          - `status_message` string
        - `version_details` VMSupportedVersion[]
          - `version` string
        - `versions` string[]
  - `total_cost` integer
  - `ttl` string

## Other responses

- `201` — CreateVMResponse contains the response to create a vm
- `400` — CreateVMErrorResponse contains error information
- `401` — Return if the caller is not authorized
- `403` — Returned if the caller does not have the needed permission
- `404` — Returned on resource not found

---

[API](https://skmtc.net/replicated/apis/vendor-api-v3-2.md) · [All operations](https://skmtc.net/replicated/apis/vendor-api-v3-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/replicated/vendor-api-v3-2/versions/6fcf9e54aba4/schema)
