ESXi

 View Only
  • 1.  ESXi 6 - Unable to connect USB Device to VM

    Posted Mar 02, 2016 08:28 PM

    Hi folks:

    I'm having a problem with a particular USB 3 device in trying to connect it to a VM.  The device is a Toshiba USB 3 5tb hard drive, and it's recognized by ESXi as I can see it when I do a lsusb command, but it's never offered as an available choice to connect to any VM.  I've tried restarting all the management agents, rebooting ESXi with the device plugged in so that it's detected immediately at bootup.  I've tried using both the vcenter server appliance web client and the native C client.  It simply never appears as a choice just as if it's not there.  Other USB 3 devices, including a Startech gigabit network device and another 2tb Toshiba USB drive appear as choices, so it doesn't appear to be an issue with USB 3 devices as a whole.  I've connected to other computers and even to an Arch Linux VM under the same ESXi that has a Startech USB 3 controller connected to it via PCI Passthrough and it works in all those places.  I even tried connecting it to a USB 2 port just for the heck of it, and I got the same result (invisible to VMs)  Here is what information I have via the logs.  I see some entries about the device being suspended in the vmkernel log, but I don't know if that's normal procedure for a device until it's assigned to a VM. 

    Any ideas of what's wrong or how to fix it welcome.

    lsusb

    [root@naplesesxi:/var/log] lsusb

    Bus 004 Device 011: ID 0480:d011 Toshiba America Info. Systems, Inc.

    Bus 004 Device 008: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet

    Bus 003 Device 003: ID 2109:2811

    Bus 004 Device 007: ID 2109:8110

    Bus 002 Device 012: ID 1058:1003 Western Digital Technologies, Inc. Elements 1000 GB

    Bus 002 Device 007: ID 059b:0277 Iomega Corp.

    Bus 002 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS

    Bus 002 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub

    Bus 004 Device 002: ID 0781:5583 SanDisk Corp.

    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

    Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    [root@naplesesxi:/var/log]

    lsusb detail

    [root@naplesesxi:/var/log] lsusb -v -d 0480:d011

    Bus 004 Device 011: ID 0480:d011 Toshiba America Info. Systems, Inc.

    Device Descriptor:

      bLength                18

      bDescriptorType         1

      bcdUSB               3.00

      bDeviceClass            0 (Defined at Interface level)

      bDeviceSubClass         0

      bDeviceProtocol         0

      bMaxPacketSize0         9

      idVendor           0x0480 Toshiba America Info. Systems, Inc.

      idProduct          0xd011

      bcdDevice            6.07

      iManufacturer           1 TOSHIBA

      iProduct                2 External USB 3.0

      iSerial                 3 20140426016164

      bNumConfigurations      1

      Configuration Descriptor:

        bLength                 9

        bDescriptorType         2

        wTotalLength           44

        bNumInterfaces          1

        bConfigurationValue     1

        iConfiguration          0

        bmAttributes         0xc0

          Self Powered

        MaxPower                2mA

        Interface Descriptor:

          bLength                 9

          bDescriptorType         4

          bInterfaceNumber        0

          bAlternateSetting       0

          bNumEndpoints           2

          bInterfaceClass         8 Mass Storage

          bInterfaceSubClass      6 SCSI

          bInterfaceProtocol     80 Bulk-Only

          iInterface              0

          Endpoint Descriptor:

            bLength                 7

            bDescriptorType         5

            bEndpointAddress     0x81  EP 1 IN

            bmAttributes            2

              Transfer Type            Bulk

              Synch Type               None

              Usage Type               Data

            wMaxPacketSize     0x0400  1x 1024 bytes

            bInterval               0

            bMaxBurst              14

          Endpoint Descriptor:

            bLength                 7

            bDescriptorType         5

            bEndpointAddress     0x02  EP 2 OUT

            bmAttributes            2

              Transfer Type            Bulk

              Synch Type               None

              Usage Type               Data

            wMaxPacketSize     0x0400  1x 1024 bytes

            bInterval               0

            bMaxBurst              14

    Binary Object Store Descriptor:

      bLength                 5

      bDescriptorType        15

      wTotalLength           42

      bNumDeviceCaps          3

      USB 2.0 Extension Device Capability:

        bLength                 7

        bDescriptorType        16

        bDevCapabilityType      2

        bmAttributes   0x00000002

          Link Power Management (LPM) Supported

      SuperSpeed USB Device Capability:

        bLength                10

        bDescriptorType        16

        bDevCapabilityType      3

        bmAttributes         0x00

        wSpeedsSupported   0x000e

          Device can operate at Full Speed (12Mbps)

          Device can operate at High Speed (480Mbps)

          Device can operate at SuperSpeed (5Gbps)

        bFunctionalitySupport   1

          Lowest fully-functional device speed is Full Speed (12Mbps)

        bU1DevExitLat          10 micro seconds

        bU2DevExitLat        2047 micro seconds

      Container ID Device Capability:

        bLength                20

        bDescriptorType        16

        bDevCapabilityType      4

        bReserved               0

        ContainerID             {14c4c0cc-6785-495d-8dcb-c74305d84121}

    Device Status:     0x0001

      Self Powered

    [root@naplesesxi:/var/log]

    vmkernel when pluggin in drive

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: New USB device found, idVendor=0480, idProduct=d011

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: Product: External USB 3.0

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: Manufacturer: TOSHIBA

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: SerialNumber: 20140426016164

    2016-03-02T20:04:23.337Z cpu5:33148)<6>xhci_hcd 0000:00:14.0: add ep 0x81, slot id 12, new drop flags = 0x0, new add flags = 0x8

    2016-03-02T20:04:23.337Z cpu5:33148)<6>xhci_hcd 0000:00:14.0: add ep 0x2, slot id 12, new drop flags = 0x0, new add flags = 0x18

    2016-03-02T20:04:23.337Z cpu5:33148)<6>xhci_hcd 0000:00:14.0: xhci_check_bandwidth called for udev 0x4302ab3e2bc0

    2016-03-02T20:04:23.337Z cpu5:33148)<6>xhci_hcd 0000:00:14.0: New Input Control Context:

    2016-03-02T20:04:23.337Z cpu5:33148)<6>xhci_hcd 0000:00:14.0: Output context after successful config ep cmd:

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: Vendor: 0x0480, Product: 0xd011, Revision: 0x0607

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: Interface Subclass: 0x06, Protocol: 0x50

    2016-03-02T20:04:23.337Z cpu5:33148)WARNING: LinScsiLLD: scsi_add_host:573: vmkAdapter (usb-storage) sgMaxEntries rounded to 255. Reported size was 65535

    2016-03-02T20:04:23.337Z cpu5:33148)LinPCI: LinuxPCI_DeviceIsPAECapable:581: PAE capable device at 0000:00:14.0

    2016-03-02T20:04:23.337Z cpu5:33148)DMA: 646: DMA Engine 'vmhba50' created using mapper 'DMANull'.

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb-storage 4-4:1.0: interface is claimed by usb-storage

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: device is not available for passthrough

    2016-03-02T20:04:23.337Z cpu5:33148)<6>usb 4-4: usbfs: registered usb040b

    2016-03-02T20:04:23.337Z cpu5:33148)<6>hub 4-0:1.0: suspended

    2016-03-02T20:04:23.349Z cpu0:32819)ScsiNpiv: 1505: GetInfo for adapter vmhba50, [0x4301a7966240], max_vports=0, vports_inuse=0, linktype=0, state=0, failreason=0, sts=bad0020

    2016-03-02T20:04:23.493Z cpu5:33105)<6>xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling.

    2016-03-02T20:04:25.340Z cpu5:33111)<6>usb usb3: suspended

    2016-03-02T20:04:25.340Z cpu5:33111)<6>usb usb3: suspended

    2016-03-02T20:04:34.056Z cpu6:33107)<6>usb-storage 4-4:1.0: suspended

    2016-03-02T20:05:15.869Z cpu4:162661)<6>usb passthrough disabled

    2016-03-02T20:05:16.059Z cpu2:162686)VC: 3551: Device rescan time 9 msec (total number of devices 5)

    2016-03-02T20:05:16.059Z cpu2:162686)VC: 3554: Filesystem probe time 13 msec (devices probed 3 of 5)

    2016-03-02T20:05:16.059Z cpu2:162686)VC: 3556: Refresh open volume time 1 msec

    2016-03-02T20:05:16.150Z cpu1:162688)<6>usb passthrough enabled; all eligible devices will be unclaimed by kernel drivers

    2016-03-02T20:05:16.235Z cpu6:162690)VC: 3551: Device rescan time 8 msec (total number of devices 5)

    2016-03-02T20:05:16.235Z cpu6:162690)VC: 3554: Filesystem probe time 11 msec (devices probed 3 of 5)

    2016-03-02T20:05:16.235Z cpu6:162690)VC: 3556: Refresh open volume time 1 msec

    2016-03-02T20:05:16.292Z cpu2:162691)ScsiScan: 836: Path vmhba0:C0:T0:L0 supports REPORT LUNS 0x11

    2016-03-02T20:05:27.898Z cpu3:162776)CMMDS: CMMDSVSIUpdateNetworkCbk:2150: RECONFIGURE of interface vmk3 with cmmds (Success).

    2016-03-02T20:05:27.921Z cpu3:162776)VC: 3551: Device rescan time 9 msec (total number of devices 5)

    2016-03-02T20:05:27.921Z cpu3:162776)VC: 3554: Filesystem probe time 13 msec (devices probed 3 of 5)

    2016-03-02T20:05:27.921Z cpu3:162776)VC: 3556: Refresh open volume time 1 msec

    2016-03-02T20:05:28.512Z cpu4:162776)Config: 680: "SIOControlFlag2" = 0, Old Value: 0, (Status: 0x0)

    2016-03-02T20:05:32.679Z cpu0:162776)Config: 680: "VMOverheadGrowthLimit" = 4294967295, Old Value: 4294967295, (Status: 0x0)

    2016-03-02T20:05:34.612Z cpu6:162983)TPM FixedMem: start = 0xfed40000, end = 0xfed44fff, write protect = 0

    2016-03-02T20:05:46.397Z cpu7:162998 opID=73a64522)World: 15514: VC opID HB-SpecSync-host-9@0-3fda4c20-7-209f maps to vmkernel opID 73a64522

    2016-03-02T20:05:46.397Z cpu7:162998 opID=73a64522)Config: 680: "HostLocalSwapDirEnabled" = 0, Old Value: 0, (Status: 0x0)

    2016-03-02T20:06:00.897Z cpu3:162786 opID=478d4c8)World: 15514: VC opID HB-SpecSync-host-9@0-799bbb99-81-212f maps to vmkernel opID 478d4c8

    2016-03-02T20:06:00.897Z cpu3:162786 opID=478d4c8)Config: 680: "HostLocalSwapDirEnabled" = 0, Old Value: 0, (Status: 0x0)



  • 2.  RE: ESXi 6 - Unable to connect USB Device to VM
    Best Answer

    Posted Apr 06, 2016 02:07 PM

    Hi guys, I have just had the same issue and resolved it on my test environment.

    I got the Device ID using "lsusb"

    Bus 004 Device 002: ID 0480:d011 Toshiba America Info. Systems, Inc.

    where 0480:d011 is the Device ID

    Then ran the following command:

    esxcfg-module -s quirks=0480:d011:i usb-storage

    After a reboot I was able to pass through the device to my VMs.

    I am not an expert in this, as far as I can understand from this thread: Problem mit USB Passthrough (eine HDD geht, andere nicht) - vSphere5 / ESXi 5.0 und 5.1 - VMware Forum the "usb-storage" module freezes when trying to access this drive and does not pass it through to the usb arbitrator. The person in that thread disables usb-storage but I boot from USB and so I couldn't do that. Stealing the idea from this thread: Zero-calorie tech treats: VMFS-formatted USB sticks in VMware vSphere 5.1 I was able to exclude the USB device from the usb-storage module (I think).

    I have not tested how this affects any other functionality but initial testing is positive.



  • 3.  RE: ESXi 6 - Unable to connect USB Device to VM

    Posted Apr 24, 2016 07:54 PM

    That did the trick!   BTW that was some very good detective work on your part figuring out which quirk setting would achieve what the poster in the other thread achieved by disabling usb-storage. 

    Thank you very much! 



  • 4.  RE: ESXi 6 - Unable to connect USB Device to VM

    Posted Apr 25, 2016 07:07 AM

    No problem! Glad it's resolved for you .



  • 5.  RE: ESXi 6 - Unable to connect USB Device to VM

    Posted Jan 29, 2018 10:08 PM

    Really great stuff dude!  It worked like a charm!! Thanks!!!!!!!!!!!!



  • 6.  RE: ESXi 6 - Unable to connect USB Device to VM

    Posted Feb 21, 2022 09:01 AM

    This was very helpful and resolved my USB modem mapping issue to Virtual Machine. Thanks Daide !