---
title: "Add a new disk to the VM"
method: PUT
path: "/vm.add-disk"
---

# Add a new disk to the VM

`PUT /vm.add-disk`

## Request body

- 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'

## Response `200`

The new disk was successfully added to the VM instance.

- PciDeviceInfo — Information about a PCI device
  - `id` string, required
  - `bdf` string, required

## Other responses

- `204` — The new disk was successfully (cold) added to the VM instance.
- `500` — The new disk could not be added to the VM instance.

## Changes

- **2026-07-17** `c30c01a9fb80` — 3 info
  - added the new optional request property `backing_files`
  - added the new optional request property `image_type`
  - added the new optional request property `sparse`
- **2025-07-25** `b09352e354b3` — 1 info
  - the request property `path` became optional
- **2024-04-30** `7f0022889515` — 2 info
  - added the new optional request property `queue_affinity`
  - added the new optional request property `rate_limit_group`
- **2023-09-25** `fc67724af8ca` — 1 info
  - added the new optional request property `serial`
- **2022-08-17** `692a2f842121` — 1 warning
  - removed the request property `poll_queue`

[Full history](https://skmtc.dev/kata-containers/apis/cloud-hypervisor-api/changes/vm.add-disk/put.md)

---

[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)
