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

# Add a new network device to the VM

`PUT /vm.add-net`

## Request body

- 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

## Response `200`

The new device was successfully added to the VM instance.

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

## Other responses

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

## Changes

- **2026-01-08** `176048fda297` — 3 info
  - added the new optional request property `offload_csum`
  - added the new optional request property `offload_tso`
  - added the new optional request property `offload_ufo`
- **2022-10-03** `92641082e481` — 2 info
  - added the new optional request property `host_mac`
  - added the new optional request property `mtu`
- **2022-02-24** `2f0e5d4cc0d8` — 1 info
  - added the success response with the status `204`
- **2022-02-14** `edef1a62f45b` — 1 warning
  - removed the request property `fds`
- **2022-01-21** `521656a27842` — 1 warning, 2 info
  - removed the request property `fd`
  - added the new optional request property `fds`
  - the `tap` request property default value `` was removed

[Full history](https://skmtc.dev/kata-containers/apis/cloud-hypervisor-api/changes/vm.add-net/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)
