book
Article ID: 315467
calendar_today
Updated On:
Issue/Introduction
This KB documents the steps required to remove a USB controller from a virtual machine.
Please note that while the ESXi host supports hot-removal of a USB controller, the guest operating system of the virtual machine must also support the hot-removal functionality. Please refer vendors documentation to determine whether this functionality is supported or not.
In the event that the guest operating system does not support hot removal of a USB controller, then the VM will need to be powered off.
In addition, please ensure that the USB controller is not in-use prior to removing it from the virtual machine.
The vSphere UI (vCenter Server, ESXi Embedded Host Client) only allows for the configuration of virtual USB 2.0 or virtual USB 3.0 controllers in VMs.
When a virtual USB 2.0 controller is added to a VM in vSphere, both a virtual USB 1.1 AND a virtual USB 2.0 controller are added to the VM by default.
Removing the virtual USB 2.0 controller will also remove the virtual USB 1.1 controller from the VM.
Additional Information
Powercli Options
The command below can be used to list all the virtual machines with a USB controller.
Any VM reported should be investigated to determine if it can be safely removed
Get-VM | ?{$_.ExtensionData.Config.Hardware.Device.DeviceInfo.Label -match "USB"}
The "Remove_USB_Controller" script attached to this KB is provided as an option to allow for the USB controller to be removed in an automated process.
However, please ensure that the virtual machine has been reviewed and that it is safe to remove the USB controller. In addition, it is important that the VM is powered off in the event that the guest operating system does not support hot removal of the USB controller
This script will
1) Prompt for the FQDN or IP address of the vCenter system
2) Prompt the user to allow for the USB controllers to be removed
3) Find all virtual machines with a USB controller
4) Attempt to remove the USB controller from the virtual machines
5) Review the environment and provide a CSV file output detailing whether a virtual machine has an USB controller or not
The attachment is a text (*.txt) file. Please rename this to a *.ps1 (Remove_USB_Controller.ps1) before executing the script
Impact/Risks:
USB pass through functionality will be unavailable as a result of removing the USB controller from the virtual machine.
In addition, virtual/emulated USB devices, such as VMware virtual USB mouse and keyboard will not be available for use by the VM.
IMPORTANT:
Certain guest operating systems, including Mac OS do not support using a PS/2 mouse and keyboard. Without a USB controller. these guest operating systems will be left without a mouse and keyboard.