vm.device.create ================ Create a new device for the VM of id `vm`. If `attributes.dtype` is the `RAW` type and a new raw file is to be created, `attributes.exists` will be passed as false. This means the API handles creating the raw file and raises the appropriate exception if file creation fails. If `attributes.dtype` is of `DISK` type and a new Zvol is to be created, `attributes.create_zvol` will be passed as true with valid `attributes.zvol_name` and `attributes.zvol_volsize` values. .. raw:: html
VMDeviceCreateArgs parameters.
No Additional PropertiesDevice-specific configuration attributes.
Device type identifier for CD-ROM/DVD devices.
Specific value:"CDROM"
    Path must not contain "{", "}" characters, and it should start with "/mnt/".
Must match regular expression:^[^{}]*$
    Must be at least 1 characters long
Device type identifier for display/graphics devices.
Specific value:"DISPLAY"
    Screen resolution for the virtual display.
VNC/SPICE port number for remote display access. null for auto-assignment.
Value must be greater or equal to 5900 and lesser or equal to 65535
Web-based display access port number. null for auto-assignment.
IP address to bind the display server to.
Must be at least 1 characters long
Whether to wait for a client connection before starting the VM.
Password for display server authentication.
Whether to enable web-based display access.
Display protocol type.
Device type identifier for network interface cards.
Specific value:"NIC"
    Whether to trust guest OS receive filter settings for better performance.
Network interface controller type. E1000 for Intel compatibility, VIRTIO for performance.
Host network interface or bridge to attach to. null for no attachment.
MAC address for the virtual network interface. null for auto-generation.
^([0-9A-Fa-f]{2}[:-]?){5}([0-9A-Fa-f]{2})$
    Device type identifier for PCI passthrough devices.
Specific value:"PCI"
    Host PCI device identifier to pass through to the VM.
Must be at least 1 characters long
Device type identifier for raw disk devices.
Specific value:"RAW"
    Path must not contain "{", "}" characters.
Must match regular expression:^[^{}]*$
    Must be at least 1 characters long
Disk controller interface type. AHCI for compatibility, VIRTIO for performance.
Whether the disk file already exists or should be created.
Whether this disk should be marked as bootable.
Size of the disk in bytes. Required if creating a new disk file.
Logical sector size for the disk. null for default.
Physical sector size for the disk. null for default.
I/O backend type for disk operations.
Serial number to assign to the virtual disk. null for auto-generated.
Must be at least 1 characters long
Device type identifier for virtual disk devices.
Specific value:"DISK"
    Path to existing disk file or ZFS volume. null if creating a new ZFS volume.
Must be at least 1 characters long
Disk controller interface type. AHCI for compatibility, VIRTIO for performance.
Whether to create a new ZFS volume for this disk.
Name for the new ZFS volume. Required if create_zvol is true.
Size of the new ZFS volume in bytes. Required if create_zvol is true.
Logical sector size for the disk. null for default.
Physical sector size for the disk. null for default.
I/O backend type for disk operations.
Serial number to assign to the virtual disk. null for auto-generated.
Must be at least 1 characters long
Device type identifier for USB devices.
Specific value:"USB"
    USB device attributes for identification. null for USB host controller only.
USB vendor identifier in hexadecimal format (e.g., '0x1d6b' for Linux Foundation).
Must match regular expression:^0x.*
    Must be at least 1 characters long
USB product identifier in hexadecimal format (e.g., '0x0002' for 2.0 root hub).
Must match regular expression:^0x.*
    Must be at least 1 characters long
USB controller type for the virtual machine.
Host USB device path to pass through. null for controller only.
Must be at least 1 characters long
ID of the virtual machine this device belongs to.
Boot order priority for this device. null for automatic assignment.
The newly created VM device configuration.
No Additional PropertiesUnique identifier for the VM device.
Device-specific configuration attributes.
Device type identifier for CD-ROM/DVD devices.
Specific value:"CDROM"
    Path must not contain "{", "}" characters, and it should start with "/mnt/".
Must match regular expression:^[^{}]*$
    Must be at least 1 characters long
Device type identifier for display/graphics devices.
Specific value:"DISPLAY"
    Screen resolution for the virtual display.
VNC/SPICE port number for remote display access. null for auto-assignment.
Value must be greater or equal to 5900 and lesser or equal to 65535
Web-based display access port number. null for auto-assignment.
IP address to bind the display server to.
Must be at least 1 characters long
Whether to wait for a client connection before starting the VM.
Password for display server authentication.
Whether to enable web-based display access.
Display protocol type.
Device type identifier for network interface cards.
Specific value:"NIC"
    Whether to trust guest OS receive filter settings for better performance.
Network interface controller type. E1000 for Intel compatibility, VIRTIO for performance.
Host network interface or bridge to attach to. null for no attachment.
MAC address for the virtual network interface. null for auto-generation.
^([0-9A-Fa-f]{2}[:-]?){5}([0-9A-Fa-f]{2})$
    Device type identifier for PCI passthrough devices.
Specific value:"PCI"
    Host PCI device identifier to pass through to the VM.
Must be at least 1 characters long
Device type identifier for raw disk devices.
Specific value:"RAW"
    Path must not contain "{", "}" characters.
Must match regular expression:^[^{}]*$
    Must be at least 1 characters long
Disk controller interface type. AHCI for compatibility, VIRTIO for performance.
Whether the disk file already exists or should be created.
Whether this disk should be marked as bootable.
Size of the disk in bytes. Required if creating a new disk file.
Logical sector size for the disk. null for default.
Physical sector size for the disk. null for default.
I/O backend type for disk operations.
Serial number to assign to the virtual disk. null for auto-generated.
Must be at least 1 characters long
Device type identifier for virtual disk devices.
Specific value:"DISK"
    Path to existing disk file or ZFS volume. null if creating a new ZFS volume.
Must be at least 1 characters long
Disk controller interface type. AHCI for compatibility, VIRTIO for performance.
Whether to create a new ZFS volume for this disk.
Name for the new ZFS volume. Required if create_zvol is true.
Size of the new ZFS volume in bytes. Required if create_zvol is true.
Logical sector size for the disk. null for default.
Physical sector size for the disk. null for default.
I/O backend type for disk operations.
Serial number to assign to the virtual disk. null for auto-generated.
Must be at least 1 characters long
Device type identifier for USB devices.
Specific value:"USB"
    USB device attributes for identification. null for USB host controller only.
USB vendor identifier in hexadecimal format (e.g., '0x1d6b' for Linux Foundation).
Must match regular expression:^0x.*
    Must be at least 1 characters long
USB product identifier in hexadecimal format (e.g., '0x0002' for 2.0 root hub).
Must match regular expression:^0x.*
    Must be at least 1 characters long
USB controller type for the virtual machine.
Host USB device path to pass through. null for controller only.
Must be at least 1 characters long
ID of the virtual machine this device belongs to.
Boot order priority for this device (lower numbers boot first).