virt.instance.device_update

Update a device in an instance.

Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: id

id

Type: string

ID of the virtual instance to update device for.

Parameter 2: device

device


Updated device configuration.

Disk

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for virtual disk devices.

Must be one of:
  • "DISK"
Specific value: "DISK"

Source

Default: null

For CONTAINER instances, this would be a valid pool path. For VM instances, it can be a valid zvol path or an incus storage volume name.

Type: string

Must be at least 1 characters long

Type: null

Destination

Default: null

Target path where the disk appears inside the virtualized instance.

Type: string
Type: null

Boot Priority

Default: null

Boot priority for this disk device. Lower numbers boot first. null means non-bootable.

Type: integer

Value must be greater or equal to 0

Type: null

Io Bus

Type: enum (of null or string) Default: null

Storage bus type for optimal performance and compatibility.

Must be one of:
  • "NVME"
  • "VIRTIO-BLK"
  • "VIRTIO-SCSI"
  • null

Storage Pool

Default: null

Storage pool in which the device is located. This must be one of the storage pools listed in virt.global.config output.
If this is set to None during device creation, then the default storage pool defined in virt.global.config will be used.

Type: string

Must be at least 1 characters long

Type: null

GPU

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for graphics processing units.

Must be one of:
  • "GPU"
Specific value: "GPU"

Gpu Type

Type: enum (of string)

Type of GPU virtualization (physical passthrough, mediated device, etc.).

Must be one of:
  • "PHYSICAL"
  • "MDEV"
  • "MIG"
  • "SRIOV"

Id

Default: null

Unique identifier for the GPU device.

Type: string
Type: null

Gid

Default: null

Group ID for device permissions inside the container.

Type: integer

Value must be greater or equal to 0 and lesser or equal to 90000000

Type: null

Uid

Default: null

User ID for device permissions inside the container.

Type: integer

Value must be greater or equal to 0 and lesser or equal to 90000000

Type: null

Mode

Default: null

Permission mode for device access (e.g., '660').

Type: string
Type: null

Mdev

Default: null

Mediated device identifier for GPU virtualization.

Type: string

Must be at least 1 characters long

Type: null

Mig Uuid

Default: null

Multi-Instance GPU UUID for NVIDIA GPU partitioning.

Type: string

Must be at least 1 characters long

Type: null

Pci

Default: null

PCI address of the GPU device on the host system.

Type: string

Must be at least 1 characters long

Type: null

Productid

Default: null

Product identifier for GPU device matching.

Type: string

Must be at least 1 characters long

Type: null

Vendorid

Default: null

Vendor identifier for GPU device matching.

Type: string

Must be at least 1 characters long

Type: null

Proxy

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for network port forwarding.

Must be one of:
  • "PROXY"
Specific value: "PROXY"

Source Proto

Type: enum (of string)

Network protocol (TCP or UDP) for the source connection.

Must be one of:
  • "UDP"
  • "TCP"

Source Port

Type: integer

Source port number on the host system to forward from.

Value must be greater or equal to 1 and lesser or equal to 65535

Dest Proto

Type: enum (of string)

Network protocol (TCP or UDP) for the destination connection.

Must be one of:
  • "UDP"
  • "TCP"

Dest Port

Type: integer

Destination port number inside the virtualized instance.

Value must be greater or equal to 1 and lesser or equal to 65535

TPM

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for Trusted Platform Module devices.

Must be one of:
  • "TPM"
Specific value: "TPM"

Path

Default: null

Path to the TPM device on the host system.

Type: string
Type: null

Pathrm

Default: null

Resource manager path for TPM device access.

Type: string
Type: null

USB

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for USB devices.

Must be one of:
  • "USB"
Specific value: "USB"

Bus

Default: null

USB bus number on the host system.

Type: integer
Type: null

Dev

Default: null

USB device number on the specified bus.

Type: integer
Type: null

Product Id

Default: null

USB product identifier for device matching.

Type: string
Type: null

Vendor Id

Default: null

USB vendor identifier for device matching.

Type: string
Type: null

NIC

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for network interface cards.

Must be one of:
  • "NIC"
Specific value: "NIC"

Network

Default: null

Name of the network to connect this NIC to.

Type: string

Must be at least 1 characters long

Type: null

Nic Type

Default: null

Type of network interface (bridged or macvlan).

Type: enum (of string)
Must be one of:
  • "BRIDGED"
  • "MACVLAN"
Type: null

Parent

Default: null

Parent network interface on the host system.

Type: string

Must be at least 1 characters long

Type: null

Mac

Default: null

MAC address for the virtual network interface. null for auto-generated.

Type: string
Type: null

PCI

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for PCI device passthrough.

Must be one of:
  • "PCI"
Specific value: "PCI"

Address

Type: string

PCI bus address of the device to pass through to the virtualized instance.

Must be at least 1 characters long

CDROM

Type: object
No Additional Properties

Name

Default: null

Optional human-readable name for the virtualization device.

Type: string

Must be at least 1 characters long

Type: null

Description

Default: null

Optional description explaining the purpose or configuration of this device.

Type: string

Must be at least 1 characters long

Type: null

Readonly

Type: boolean Default: false

Whether the device should be mounted in read-only mode.

Dev Type

Type: const

Device type identifier for CD-ROM/DVD optical drives.

Must be one of:
  • "CDROM"
Specific value: "CDROM"

Source

Type: string

Path to the ISO image file or physical optical drive to mount.

Must be at least 1 characters long

Boot Priority

Default: null

Boot priority for this optical device. Lower numbers boot first. null means non-bootable.

Type: integer

Value must be greater or equal to 0

Type: null

Result

Type: const

Returns true when the device is successfully updated.

Must be one of:
  • true
Specific value: true


Required roles: VIRT_INSTANCE_WRITE