---
title: "Create VM from a base image or snapshot"
method: POST
path: "/v1/vms"
tags: ["VMs"]
---

# Create VM from a base image or snapshot

`POST /v1/vms`

## Request body

- union
  - object
    - `name` string
    - `machineType` 'c1m2' | 'c2m4' | 'c4m8' | 'c8m16', required
    - `snapshotId` string, uuid
    - `diskGiB` integer — Optional grow-only disk size in GiB. Must be >= base machine disk (10 GiB) or >= source snapshot VM disk.
    - `firewall` FirewallPolicy — Public IPv6 ingress firewall policy for a VM or snapshot.
      - `mode` 'open' | 'restricted', required
      - `ingress` FirewallRule[] — Allow rules evaluated only when `mode` is `restricted`. If empty, all public IPv6 ports are closed except essential ICMPv6 control traffic.
        - `protocol` 'tcp' | 'udp', required
        - `portStart` integer, required
        - `portEnd` integer
        - `sourceCidrs` string[] — IPv6 CIDRs allowed by this rule. If omitted, the backend treats the rule as open to `::/0`.
        - `description` string
  - object
    - `name` string
    - `machineType` 'c1m2' | 'c2m4' | 'c4m8' | 'c8m16'
    - `snapshotId` string, uuid, required
    - `diskGiB` integer — Optional grow-only disk size in GiB. Must be >= base machine disk (10 GiB) or >= source snapshot VM disk.
    - `firewall` FirewallPolicy — Public IPv6 ingress firewall policy for a VM or snapshot.
      - `mode` 'open' | 'restricted', required
      - `ingress` FirewallRule[] — Allow rules evaluated only when `mode` is `restricted`. If empty, all public IPv6 ports are closed except essential ICMPv6 control traffic.
        - `protocol` 'tcp' | 'udp', required
        - `portStart` integer, required
        - `portEnd` integer
        - `sourceCidrs` string[] — IPv6 CIDRs allowed by this rule. If omitted, the backend treats the rule as open to `::/0`.
        - `description` string

## Response `201`

VM created

- VMInstance
  - `id` string, uuid, required
  - `name` string, required
  - `orgId` string, required
  - `machineName` string, required
  - `sourceName` string
  - `firewall` FirewallPolicy — Public IPv6 ingress firewall policy for a VM or snapshot.
    - `mode` 'open' | 'restricted', required
    - `ingress` FirewallRule[] — Allow rules evaluated only when `mode` is `restricted`. If empty, all public IPv6 ports are closed except essential ICMPv6 control traffic.
      - `protocol` 'tcp' | 'udp', required
      - `portStart` integer, required
      - `portEnd` integer
      - `sourceCidrs` string[] — IPv6 CIDRs allowed by this rule. If omitted, the backend treats the rule as open to `::/0`.
      - `description` string
  - `cpu` integer, required
  - `memoryMiB` integer, required
  - `diskGiB` integer, required
  - `publicIpv6` string
  - `status` 'provisioning' | 'running' | 'stopped' | 'deleting' | 'error', required
  - `createdAt` string, date-time, required
  - `deletedAt` string, date-time, nullable

## Other responses

- `202` — VM accepted and queued for capacity or worker readiness
- `400` — Error response
- `401` — Error response
- `403` — Error response
- `409` — Error response
- `502` — Error response
- `503` — Error response

---

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