v1

latestOpenAPI 3.0.1Apache 2.02026-07-17304456.7 KB

Add a new network device to the VM

put/vm.add-net

Request body

tapstring
ipstring

IPv4 or IPv6 address

maskstring

Must be a valid IPv4 netmask if ip is an IPv4 address or a valid IPv6 netmask if ip is an IPv6 address.

macstring
host_macstring
mtuinteger
iommuboolean
num_queuesinteger
queue_sizeinteger
vhost_userboolean
vhost_socketstring
vhost_modestring
idstring
pci_segmentinteger
offload_tsoboolean
offload_ufoboolean
offload_csumboolean

Example request

{
  "tap": "tap",
  "host_mac": "host_mac",
  "num_queues": 6,
  "offload_ufo": true,
  "queue_size": 1,
  "offload_csum": true,
  "ip": "192.168.249.1",
  "rate_limiter_config": {
    "ops": {
      "size": 0,
      "one_time_burst": 0,
      "refill_time": 0
    },
    "bandwidth": {
      "size": 0,
      "one_time_burst": 0,
      "refill_time": 0
    }
  },
  "mac": "mac",
  "mtu": 3,
  "pci_segment": 2,
  "offload_tso": true,
  "vhost_mode": "Client",
  "iommu": false,
  "vhost_socket": "vhost_socket",
  "vhost_user": false,
  "id": "id",
  "mask": "255.255.255.0"
}

Response

The new device was successfully added to the VM instance.

idstring required
bdfstring required

Example response

{
  "bdf": "bdf",
  "id": "id"
}