Document navigation

USB Pass-through

Overview

Inventory

USB Device Inventory

Name Description Optional Valid Value Starting Version
uuid The UUID. For more information, see Resource Property. 2.2
name The name. For more information, see Resource Property. 2.2
description The description. For more information, see Resource Property. Yes 2.2
hostUuid The host UUID. 2.2
vmInstanceUuid The VM instance UUID. 2.2
busNum The bus No. 2.2
devNum The device No. 2.2
idVendor The vendor ID. 2.2
idProduct The product ID. 2.2
iManufacturer The manufacturer. 2.2
iProduct The product type. 2.2
iSerial The serial No. 2.2
usbVersion The USB version. 2.2
attachType The attaching type. 3.5.0
state The state. 2.2
groupBy Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. Yes 2.2
createDate The creation date. For more information, see Resource Property. 2.2
lastOpDate The last operation date. For more information, see Resource Property. 2.2
userTags The user tags. For more information, see CreateUserTag. Yes 2.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.2
Sample
{
  "inventory": {
    "uuid": "dc782167a4853525848fd04bf606d072",
    "name": "usb",
    "hostUuid": "dea6020aae7b3244be45eee6ae1d4d0f",
    "vmInstanceUuid": "33471e0ae8a33b3b8b0f295eff6e4db4",
    "state": "Enabled",
    "busNum": "001",
    "devNum": "001",
    "idVendor": "0781",
    "idProduct": "5591",
    "iManufacturer": "SanDisk",
    "iProduct": "Ultra USB 3.0",
    "iSerial": "000000000001",
    "usbVersion": "3.0",
    "attachType": "PassThrough"
  }
}

Operations

AttachUsbDeviceToVm

Attaches a USB device to a VM instance. For example,
AttachUsbDeviceToVm usbDeviceUuid=09d68ab1c91442c4bdb9f5b59079e9ac vmInstanceUuid=4889075483754968bab966ba3294747a

Parameters

Name Description Optional Valid Value Starting Version
usbDeviceUuid The USB device UUID. 2.2
vmInstanceUuid The VM instance UUID. 2.2
attachType The attaching type. Yes
  • PassThrough
  • Redirect
3.5.0
userTags The user tags. For more information, see CreateUserTag. Yes 2.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.2
timeout Yes

DetachUsbDeviceFromVm

Detaches a USB device from a VM instance. For example,
DetachUsbDeviceFromVm usbDeviceUuid=5256c889e9f0489e8fd12b66d176fb7d

Parameters

Name Description Optional Valid Value Starting Version
usbDeviceUuid The USB device UUID. 2.2
userTags The user tags. For more information, see CreateUserTag. Yes 2.2
systemTags The user tags. For more information, see CreateSystemTag. Yes 2.2
timeout Yes

GetUsbDeviceCandidatesForAttachingVm

Obtains a list of USB devices that can be passed through to a VM instance. For example,
GetUsbDeviceCandidatesForAttachingVm vmInstanceUuid=ccc9b37a79154f4c9bc422798dc6e293

Parameters

Name Description Optional Valid Value Starting Version
vmInstanceUuid The VM instance UUID. 2.2
attachType The attaching type.
  • PassThrough
  • Redirect
3.5.0
userTags The user tags. For more information, see CreateUserTag. Yes 2.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.2
timeout Yes

QueryUsbDevice

Queries a USB device. For example,
QueryUsbDevice 

Primitive Fields of Query

See USB Device Inventory.

Nested and Expanded Fields of Query

Field Inventory Description Starting Version
host Host Inventory The host to which the PCI device belongs. 2.2
vmInstance VM Inventory The VM instance to which the PCI device is attached. 2.2

UpdateUsbDevice

Updates a USB device. For example,
UpdateUsbDevice uuid=USB state=Enabled

Parameters

Name Description Optional Valid Value Starting Version
uuid The resource UUID. 2.2
name The resource name. Yes 2.2
description The detailed description of the resource. Yes 2.2
state The USB device state. Yes
  • Enabled
  • Disabled
2.2
userTags The user tags. For more information, see CreateUserTag. Yes 2.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.2
timeout Yes
CLI Command Manual | 4.8.38 | ZStack Cloud · ZCF | ZStack Resource Center