---
title: "Creates or updates a drive."
method: PUT
path: "/drives/{drive_id}"
---

# Creates or updates a drive.

`PUT /drives/{drive_id}`

Creates new drive with ID specified by drive_id path parameter. If a drive with the specified ID already exists, updates its state based on new input. Will fail if update is not possible.

## Path parameters

- `drive_id` string, required

## Request body

- Drive
  - `drive_id` string, required
  - `path_on_host` string, required — Host level path for the guest drive
  - `is_root_device` boolean, required
  - `partuuid` string — Represents the unique id of the boot partition of this device. It is optional and it will be taken into account only if the is_root_device field is true.
  - `is_read_only` boolean, required
  - `rate_limiter` RateLimiter — 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 — The total number of tokens this bucket can hold.
      - `one_time_burst` integer — The initial size of a token bucket.
      - `refill_time` integer — 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 — The total number of tokens this bucket can hold.
      - `one_time_burst` integer — The initial size of a token bucket.
      - `refill_time` integer — The amount of milliseconds it takes for the bucket to refill.

## Response `204`

Drive created/updated

## Other responses

- `400` — Drive cannot be created/updated due to bad input
- `default` — Internal server error.

---

[API](https://skmtc.dev/solo-io/apis/firecracker-api.md) · [All operations](https://skmtc.dev/solo-io/apis/firecracker-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/solo-io/firecracker-api/revisions/6e4082be4a32/schema)
