VMware : Unable to connect USB device to VM with ESXi vSphere 5.5

By | April 21, 2014

I recently faced the following issue with VMware ESXi vSphere 5.5 hypervisor, trying to connect a USB device to a virtual machine. The host server was actually able to see the USB device :

lsusb

Bus 02 Device 04: ID 1058:0748 Western Digital Technologies, Inc.
Bus 02 Device 03: ID 09eb:0131 IM Networks, Inc.
Bus 02 Device 02: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 02 Device 01: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 01 Device 04: ID 0624:0249 Avocent Corp.
Bus 01 Device 03: ID 0624:0248 Avocent Corp.
Bus 01 Device 02: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 01 Device 01: ID 1d6b:0002 Linux Foundation 2.0 root hub

I could observe the following error in the log :

/var/log/usb.log

2014-02-19T14:45:16Z usbarb[33760]: W110: USBArb: Error in rules file at line 1:0, ‘[‘ or ‘{‘ expected near end of file.
2014-02-19T14:45:16Z usbarb[33760]: I120: VMware USB Arbitration Service Version 11.1.6
2014-02-19T14:45:16Z usbarb[33760]: I120: USBArb: Attempting to connect to existing arbitrator on /var/run/vmware/usbarbitrator-socket.
2014-02-19T14:45:16Z usbarb[33760]: I120: SOCKET creating new socket, connecting to /var/run/vmware/usbarbitrator-socket
2014-02-19T14:45:16Z usbarb[33760]: W110: SOCKET connect failed, error 2: No such file or directory
2014-02-19T14:45:16Z usbarb[33760]: I120: USBArb: Failed to connect to the existing arbitrator.
2014-02-19T14:45:31Z usbarb[33760]: I120: USBArb: UsbArbPipeConnected: Connected to client, socket:13
2014-02-19T14:45:31Z usbarb[33760]: I120: USBArb: Client 33882 connected (version: 6)

No matter what happened, I was able to add the USB controller to the VM, but the device itself wasn’t shown to be added as virtual hardware to that particular VM.

Finally, it end up to be a script error on the USB arbitrator script. To correct this, follow this procedure :

1. Put your hypervisor in maintenance mode.

2. Go to the following directory :

cd /etc/init.d/

3. Copy the usbarbitrator script (we are doing this because the original file is read-only) :

cp -p usbarbitrator usbarbitrator.bak

4. Edit the script you just copied :

vi usbarbitrator.bak

5. Modify the fourth line which should look like this :

# chkconfig: 3 70 70

To be like this and safe the file :

# chkconfig: 3 17 83

6. Disable and enable the usbarbitrator :

chkconfig usbarbitrator off
chkconfig usbarbitrator on

7. Reboot your ESXi server.

8. Stop the hostd service :

/etc/init.d/hostd stop

9. Stop and then start the usbarbitrator service :

/etc/init.d/usbarbitrator stop
/etc/init.d/usbarbitrator start

10. Start the hostd service :

/etc/init.d/hostd start

11. Go to the VM hardware inventory and the USB device should now be shown, just add it and boot your VM.