Unable to connect a USB device to a virtual machine
search cancel

Unable to connect a USB device to a virtual machine

book

Article ID: 334608

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • You are unable to connect a USB device to a virtual machine
  • Connecting a USB device to a virtual machine through vSphere client fails with the error:

    msg.usb.cantConnect
    Unable to connect the USB device "device" to the virtual machine (error code error_number).


  • In the vmware.log file, you see entries similar to:

    msg.usb.cantConnect
    Unable to connect the USB device "device" to the virtual machine (error code error_number).


Environment

VMware vSphere ESXi 5.0

Cause

If the error number is 8, the failure could be due to one of these reasons:
  • When you are try to connect the USB device to a virtual machine before the virtual machine has completely powered on.
  • The USB device auto connection pattern value in the virtual machine's configuration file(*.vmx) is no longer valid. The USB auto-connection pattern is defined in a virtual machine's vmx file using the attribute usb.autoConnect.device.
If the error number is 13, the reason for the failure is:
  • The USB device does not match the connection pattern mentioned in the virtual machine's configuration file(*.vmx).

Resolution

To resolve this issue:
  1. Connect the USB device to the virtual machine only after the virtual machines complete the power on and
    bootup steps.
  2. Verify that the USB auto connection pattern in the virtual machine's configuration file is valid.

    For more information, see Automatically connecting USB devices at virtual machine power on (1648).
Alternatively, edit the configuration file of the virtual machine and delete the line containing this setting:
usb.autoConnect.device0 = ...
For more information on editing the configuration of the virtual machine, see Tips for editing a .vmx file (1714).



Additional Information

Automatically connecting USB devices at virtual machine power on
Tips for editing a .vmx file