VMware vSphere

 View Only
  • 1.  USB device unavailable after shutdown

    Posted Aug 11, 2017 11:17 AM

    So, we had a VM that was using an external USB drive for a legacy system (don't ask, I didn't set it up). After I put the host in Maintenance mode, and shut it down to add memory, the USB drive is no longer available for VMs to use.

    It's there in lsiusb, but not available when trying to connect it to the VM.

    usbarbitrator is running

    ~ # lsusb

    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

    Bus 02 Device 03: ID 0bc2:3312 Seagate RSS LLC

    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

    Any ideas why that would happen?



  • 2.  RE: USB device unavailable after shutdown

    Posted Aug 11, 2017 12:05 PM

    Hi!

    Do you have any reference to USB drive in VM's vmx file?

    If so, can you try to remove this reference from a VMX file and try to add USB drive again?



  • 3.  RE: USB device unavailable after shutdown

    Posted Aug 11, 2017 12:18 PM

    Hi,

    Can't see anything except the xHCI controller ref:

    usb_xhci.pciSlotNumber = "-1"

    usb_xhci.present = "FALSE"

    usb.pciSlotNumber = "33"

    usb.present = "TRUE"

    ehci.pciSlotNumber = "34"

    ehci.present = "TRUE"

    usb:0.present = "TRUE"

    usb:0.deviceType = "hid"

    usb:0.port = "0"

    usb:0.parent = "-1"

    usb:1.speed = "2"

    usb:1.present = "TRUE"

    usb:1.deviceType = "hub"

    usb:1.port = "1"

    usb:1.parent = "-1"

    The device is not available in the VM's "Connect to a USB Device" dropdown either. I think it's the HOST machine that's not processing the device correctly. There's nothing available at the drive's vmhba32:C0:T0:L0 path.

    ~ # dmesg | grep Seagate

    2017-08-11T09:39:55.282Z cpu0:33453)<6>usb 2-1.2: Manufacturer: Seagate

    2017-08-11T09:39:56.290Z cpu10:33473)ScsiScan: 976: Path 'vmhba32:C0:T0:L0': Vendor: 'Seagate '  Model: 'Expansion Desk  '  Rev: '0740'



  • 4.  RE: USB device unavailable after shutdown
    Best Answer

    Posted Aug 11, 2017 02:11 PM

    hmmmm....

    Can you double check that VM in question is running on ESXi hosts where USB drive is attached? Maybe you didn't migrate it back on host after exiting from maintenance mode...

    Also it might be useful to restart managements agents on your ESXi host and check usbarbitrator, hostd and vmkernel log.



  • 5.  RE: USB device unavailable after shutdown

    Posted Aug 11, 2017 07:42 PM

    The VM is definitely on the correct host. Management agent restarted already. Host restarted twice at this point.

    Logs:

    ~ # tail -f /var/log/vmkernel.log | grep -i USB

    <blank>

    ~ # tail -f /var/log/usb.log

    2017-08-11T10:20:22Z usbarb[41913]: W110: USBArb: Error in rules file at line 1:0, '[' or '{' expected near end of file.

    2017-08-11T10:20:22Z usbarb[41913]: I120: VMware USB Arbitration Service Version 11.1.6

    2017-08-11T10:20:22Z usbarb[41913]: I120: USBArb: Attempting to connect to existing arbitrator on /var/run/vmware/usbarbitrator-socket.

    2017-08-11T10:20:22Z usbarb[41913]: I120: SOCKET creating new socket, connecting to /var/run/vmware/usbarbitrator-socket

    2017-08-11T10:20:22Z usbarb[41913]: W110: SOCKET connect failed, error 2: No such file or directory

    2017-08-11T10:20:22Z usbarb[41913]: I120: USBArb: Failed to connect to the existing arbitrator.

    2017-08-11T10:37:10Z usbarb[41913]: I120: USBArb: UsbArbPipeConnected: Connected to client, socket:13

    2017-08-11T10:37:10Z usbarb[41913]: I120: USBArb: UsbArbPipeConnected: Connected to client, socket:14

    2017-08-11T10:37:10Z usbarb[41913]: I120: USBArb: Client 44500 connected (version: 6)

    2017-08-11T10:37:14Z usbarb[41913]: I120: USBArb: Client 44500 connected (version: 6)

    Looks like usbarbitrator wasn't properly connecting to its socket.

    /etc/init.d/hostd restart did the job

    Thanks for pointing me in the right direction.



  • 6.  RE: USB device unavailable after shutdown

    Posted Aug 11, 2017 09:43 PM

    Glad to hear that this has been sorted out.

    There was something similar in the past with ESXi 5.0 GA version Unable to add a USB device to a virtual machine (1039359) | VMware KB

    However I doubt that you are using this very-very old version.