---
title: "Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created."
method: PUT
path: "/vm.create"
---

# Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.

`PUT /vm.create`

## Request body

- VmConfig — Virtual machine configuration
  - `cpus` CpusConfig
    - `boot_vcpus` integer, required
    - `max_vcpus` integer, required
    - `topology` CpuTopology
      - `threads_per_core` integer
      - `cores_per_die` integer
      - `dies_per_package` integer
      - `packages` integer
    - `kvm_hyperv` boolean
    - `max_phys_bits` integer
    - `nested` boolean
    - `affinity` CpuAffinity[]
      - `vcpu` integer, required
      - `host_cpus` integer[], required
    - `features` CpuFeatures
      - `amx` boolean
  - `memory` MemoryConfig
    - `size` integer, required
    - `hotplug_size` integer
    - `hotplugged_size` integer
    - `mergeable` boolean
    - `hotplug_method` string
    - `shared` boolean
    - `hugepages` boolean
    - `hugepage_size` integer
    - `prefault` boolean
    - `thp` boolean
    - `zones` MemoryZoneConfig[]
      - `id` string, required
      - `size` integer, required
      - `file` string
      - `mergeable` boolean
      - `shared` boolean
      - `hugepages` boolean
      - `hugepage_size` integer
      - `host_numa_node` integer
      - `hotplug_size` integer
      - `hotplugged_size` integer
      - `prefault` boolean
  - `payload` PayloadConfig, required — Payloads to boot in guest
    - `firmware` string
    - `kernel` string
    - `cmdline` string
    - `initramfs` string
    - `igvm` string
    - `host_data` string
  - `rate_limit_groups` RateLimitGroupConfig[]
    - `id` string, required
    - `rate_limiter_config` RateLimiterConfig, required — Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
      - `bandwidth` TokenBucket — Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
        - `size` integer, required — The total number of tokens this bucket can hold.
        - `one_time_burst` integer — The initial size of a token bucket.
        - `refill_time` integer, required — The amount of milliseconds it takes for the bucket to refill.
      - `ops` TokenBucket — Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
        - `size` integer, required — The total number of tokens this bucket can hold.
        - `one_time_burst` integer — The initial size of a token bucket.
        - `refill_time` integer, required — The amount of milliseconds it takes for the bucket to refill.
  - `disks` DiskConfig[]
    - `path` string
    - `readonly` boolean
    - `direct` boolean
    - `iommu` boolean
    - `num_queues` integer
    - `queue_size` integer
    - `vhost_user` boolean
    - `vhost_socket` string
    - `rate_limiter_config` RateLimiterConfig — Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
      - `bandwidth` TokenBucket — Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
        - `size` integer, required — The total number of tokens this bucket can hold.
        - `one_time_burst` integer — The initial size of a token bucket.
        - `refill_time` integer, required — The amount of milliseconds it takes for the bucket to refill.
      - `ops` TokenBucket — Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
        - `size` integer, required — The total number of tokens this bucket can hold.
        - `one_time_burst` integer — The initial size of a token bucket.
        - `refill_time` integer, required — The amount of milliseconds it takes for the bucket to refill.
    - `pci_segment` integer
    - `id` string
    - `serial` string
    - `rate_limit_group` string
    - `queue_affinity` VirtQueueAffinity[]
      - `queue_index` integer, required
      - `host_cpus` integer[], required
    - `backing_files` boolean
    - `sparse` boolean
    - `image_type` 'FixedVhd' | 'Qcow2' | 'Raw' | 'Vhdx' | 'Unknown'
  - `net` NetConfig[]
    - `tap` string
    - `ip` string — IPv4 or IPv6 address
    - `mask` string — Must be a valid IPv4 netmask if ip is an IPv4 address or a valid IPv6 netmask if ip is an IPv6 address.
    - `mac` string
    - `host_mac` string
    - `mtu` integer
    - `iommu` boolean
    - `num_queues` integer
    - `queue_size` integer
    - `vhost_user` boolean
    - `vhost_socket` string
    - `vhost_mode` string
    - `id` string
    - `pci_segment` integer
    - `rate_limiter_config` RateLimiterConfig — Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
      - `bandwidth` TokenBucket — Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
        - `size` integer, required — The total number of tokens this bucket can hold.
        - `one_time_burst` integer — The initial size of a token bucket.
        - `refill_time` integer, required — The amount of milliseconds it takes for the bucket to refill.
      - `ops` TokenBucket — Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
        - `size` integer, required — The total number of tokens this bucket can hold.
        - `one_time_burst` integer — The initial size of a token bucket.
        - `refill_time` integer, required — The amount of milliseconds it takes for the bucket to refill.
    - `offload_tso` boolean
    - `offload_ufo` boolean
    - `offload_csum` boolean
  - `rng` RngConfig
    - `src` string, required
    - `iommu` boolean
  - `balloon` BalloonConfig
    - `size` integer, required
    - `deflate_on_oom` boolean — Deflate balloon when the guest is under memory pressure.
    - `free_page_reporting` boolean — Enable guest to report free pages.
  - `fs` FsConfig[]
    - `tag` string, required
    - `socket` string, required
    - `num_queues` integer, required
    - `queue_size` integer, required
    - `pci_segment` integer
    - `id` string
  - `pmem` PmemConfig[]
    - `file` string, required
    - `size` integer
    - `iommu` boolean
    - `discard_writes` boolean
    - `pci_segment` integer
    - `id` string
  - `serial` ConsoleConfig
    - `file` string
    - `socket` string
    - `mode` 'Off' | 'Pty' | 'Tty' | 'File' | 'Socket' | 'Null', required
    - `iommu` boolean
  - `console` ConsoleConfig
    - `file` string
    - `socket` string
    - `mode` 'Off' | 'Pty' | 'Tty' | 'File' | 'Socket' | 'Null', required
    - `iommu` boolean
  - `debug_console` DebugConsoleConfig
    - `file` string
    - `mode` 'Off' | 'Pty' | 'Tty' | 'File' | 'Null', required
    - `iobase` integer
  - `devices` DeviceConfig[]
    - `path` string, required
    - `iommu` boolean
    - `pci_segment` integer
    - `id` string
    - `x_nv_gpudirect_clique` integer
  - `vdpa` VdpaConfig[]
    - `path` string, required
    - `num_queues` integer, required
    - `iommu` boolean
    - `pci_segment` integer
    - `id` string
  - `vsock` VsockConfig
    - `cid` integer, required — Guest Vsock CID
    - `socket` string, required — Path to UNIX domain socket, used to proxy vsock connections.
    - `iommu` boolean
    - `pci_segment` integer
    - `id` string
  - `numa` NumaConfig[]
    - `guest_numa_id` integer, required
    - `cpus` integer[]
    - `distances` NumaDistance[]
      - `destination` integer, required
      - `distance` integer, required
    - `memory_zones` string[]
    - `pci_segments` integer[]
    - `device_id` string
  - `iommu` boolean
  - `watchdog` boolean
  - `pvpanic` boolean
  - `pci_segments` PciSegmentConfig[]
    - `pci_segment` integer, required
    - `mmio32_aperture_weight` integer
    - `mmio64_aperture_weight` integer
  - `platform` PlatformConfig
    - `num_pci_segments` integer
    - `iommu_segments` integer[]
    - `iommu_address_width` integer
    - `serial_number` string
    - `uuid` string
    - `oem_strings` string[]
    - `tdx` boolean
    - `sev_snp` boolean
  - `tpm` TpmConfig
    - `socket` string, required
  - `landlock_enable` boolean
  - `landlock_rules` LandlockConfig[]
    - `path` string, required
    - `access` string, required

## Response `204`

The VM instance was successfully created.

---

[API](https://skmtc.dev/kata-containers/apis/cloud-hypervisor-api.md) · [All operations](https://skmtc.dev/kata-containers/apis/cloud-hypervisor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kata-containers/cloud-hypervisor-api/revisions/c30c01a9fb80/schema)
