2.2.1.6. prlsrvctl usb

The prlsrvctl usb command is used to permanently assign a USB device to a specific virtual machine. A permanently assigned USB device will be connected to the virtual machine automatically on server restart. This functionality works only with virtual machines (not containers).

Table 2.21. Subcommands

NameDescription

usb list

Lists USB devices connected to the server together with the information about their virtual machine assignments for the current user.

usb set

Permanently assigns a USB device to the specified virtual machine.

usb del

Removes a previously created USB device assignment.

usb list

Lists the USB devices connected to the physical server.

Syntax. 

prlsrvctl usb list

Returns a list of USB devices in tabular format with the following columns:

  • Name - the USB device name.
  • ID - a string that uniquely identifies the USB devices on the physical server. The ID never changes even if the device is disconnected from the server and then reconnected again. Please note that if a device ID is listed in quotes, they are a part of the ID and must be included in other calls that use it as an input parameter.
  • VM UUID - a universally unique ID of the virtual machine to which this USB device is permanently assigned. If a USB device is not assigned to any virtual machine, this column will be empty.

usb set

Permanently assigns a USB device to the specified virtual machine. A permanently assigned USB device will be connected to the virtual machine automatically on server restart. The USB device assignment is performed for the current user only. Other users may create their own USB device assignments. This functionality works only with virtual machines (not containers).

Syntax. 

prlsrvctl usb set <usb\_dev\_ID> <VM_name>

Table 2.22. Options

NameDescription

<usb_dev_ID>

The USB device ID. To obtain the list of USB devices connected to the server use the usb list command.

<VM_name>

The name of the virtual machine to which to assign the USB device.

usb del

Deletes a USB device assignment previously created with the usb set command. The USB device assignment is performed on the user level, so if you remove an assignment, it will only be removed for the current user. Other users may have their own USB devices assignments, which will not be affected.

Syntax. 

prlsrvctl usb del <usb_dev_ID>

Table 2.23. Options

NameDescription

<usb_dev_ID>

The USB device ID. To see the current USB device assignments for the current user use the usb list command.