WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / ESXi / Disable passthrough for specific USB devices for use with ESXi

Disable passthrough for specific USB devices for use with ESXi

05.27.2021 by William Lam // 11 Comments

There was another interesting question that I saw recently asking whether you can use a USB device for an ESXi Datastore while still maintaining the ability to passthrough other USB devices to a VM? This was interesting because my understanding was that you had to choose between one of the two options because ESXi required the USB Arbitrator service to be disabled for USB storage (not officially supported by VMware) and thus disabling USB passthrough for all of your VMs.

I decided to reach out to our USB expert within VMware Engineering, Songtao, who you may know as developer for the popular USB Network Native Driver for ESXi and the Community Networking Driver for ESXi Fling for this thoughts on this question. It turns out my assumption has actually been incorrect and there is actually a way to easily exclude specific USB devices from VM passthrough which can then be used by ESXi.

Below are two options for excluding a specific USB device from passthrough.

Option 1:

Step 1 - Use the following ESXCLI command to list the available USB devices and then identify the USB device that you wish to disable for passthrough. In the example below, I have two USB storage devices which have VendorId:ProductId 90c:2000 and 90c:1000 respectively. The latter device is a 256GB USB device that I will setup VMFS on

esxcli hardware usb passthrough device list


Step 2 - Run the following ESXCLI command and pass in the Bus, Dev, VendorId and ProductID of the USB device that you wish to disable passthrough for.

esxcli hardware usb passthrough device disable -d 2:7:90c:1000

Step 3 - You can verify by re-running the ESXCLI list operation in Step 1 and for the changes to go into effect, you will need to reboot the ESXi host.


Once the ESXi boots up, you now can now setup an ESXi Datastore on the USB device without needing to disable the USB Arbitrator service.

Option 2:

If the above ESXCLI command is not available, there is an alternative option which leverages the USB "quirks" configuration setting which will allow for the same USB exclusion.

Step 1 - Run lsusb command to list all USB devices and identify the USB device that you wish to disable for passthrough. In the example below, I wish to disable passthrough for USB device 090c:2000 and you will need to make a note of the VendorId:ProductId


Step 2 - Run the following ESXCLI command to configure the USB quirks configuration and replace the VendorId:ProductId value for the changes to go into effect, you will need to reboot the ESXi host.

esxcli system settings advanced set -o /USB/quirks -s 0x090c:0x2000:0:0xffff:UQ_MSC_NO_UNCLAIM

Once the ESXi boots up, you now can now setup an ESXi Datastore on the USB device without needing to disable the USB Arbitrator service.

More from my site

  • Functional USB 3.0 Ethernet Adapter (NIC) driver for ESXi 5.5 & 6.0
  • How to Access USB Storage in ESXi Shell
  • vSphere with Tanzu using Intel Arc GPU
  • How to recover ESXi installed on USB device after disabling vmkusb module?
  • Emulating a Virtual USB storage device using Nested ESXi

Categories // ESXi Tags // lsusb, Passthrough, usb

Comments

  1. michele domanico (@MicheleDomanico) says

    05/27/2021 at 12:19 pm

    Hi William,
    great content as always! Quick question on USB devices for a different context 🙂

    Do you know if there is a way to rescan the usb devices on the ESXi hosts? I have noticed usb network adapters might disappear from vSphere client (and loose connectivity) but still available on the host with a lsusb command.

    Thanks,
    Michele

    Reply
    • William Lam says

      05/28/2021 at 8:23 am

      This definitely shouldn’t be happening. Can you please provide vm-support and I can share that w/Engr. Feel free to email me by going to About section

      Reply
      • amit says

        08/19/2022 at 3:29 am

        William, I am able to setup 4 TB usb device using your other article but when I reboot the usb device becomes passthrough again. I havent tried the quirk thing but anything else I can try to make it persistent.

        Reply
        • witewulf says

          09/05/2022 at 11:26 am

          Hi all, I'm seeing the same problem. I followed William's guide for setting up USB storage as a datastore (temporary solution for backups, not "live" data) but the passthrough disable doesn't persist reboots.

          Reply
  2. colin says

    05/29/2021 at 6:42 am

    Hi William, great content as always! Thank you.
    For the option 2,why the command is:
    esxcli system settings advanced set -o /USB/quirks -s 0x090c:0x1000:0:0xffff:UQ_MSC_NO_UNCLAIM

    but not
    esxcli system settings advanced set -o /USB/quirks -s 0x090c:0x2000:0:0xffff:UQ_MSC_NO_UNCLAIM
    ? (0x1000 vs 0x2000)

    Reply
    • William Lam says

      05/29/2021 at 7:54 am

      You’re correct, it’s typo. The first example was “1000” and must have forgotten when I switched to “2000” in second example. It’s fixed

      Reply
      • colin says

        06/03/2021 at 9:41 am

        Got it. Thank you for your comment.

        Reply
  3. luba says

    11/09/2022 at 7:03 am

    Amazing!!! Thanks for this!!!

    Reply
  4. maiux says

    11/23/2022 at 11:07 pm

    Hello, thanks for these wonderful tips. I'm trying to make settings persistents across reboots because I made two local USB based datastores for ghettoVCB backups and I noticed that for some reason (crappy hw? :)) bus number changes on poweroff/poweron. So I'm going for option 2 (QUIRKS). Is there any way to specify more than one device to exclude from passthrough? Or, is there another way to make passthrough persistent across reboot?

    Reply
  5. Shawn Cornelius says

    03/23/2023 at 12:59 pm

    William,

    Should I be able to re-enable a device using "enable" instead of "disable"? I tried to enable my USB NIC for passthough, but it doesn't seem to work. The NIC is instead showing up as VUSB0 using the CDCE driver. I couldn't find a CDCE module to disable. Any idea how I can get my USB NICs to be available for passthrough?

    [[email protected]:~] esxcli hardware usb passthrough device enable -d 1:6:bda:8153
    [[email protected]:~] esxcli hardware usb passthrough device list
    Bus Dev VendorId ProductId Enabled Can Connect to VM Name
    --- --- -------- --------- ------- ------------------------- ----
    1 6 bda 8153 false no (passthrough disabled) Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter

    Thanks,
    Shawn

    Reply
    • William Lam says

      03/24/2023 at 10:14 am

      Yea, in the case where cdce driver is automatically claiming the USB NIC, you'll need to apply USB Quirk to tell VMkernel not to claim the device.

      In your example, just run the following ESXCLI command: esxcli system settings advanced set -o /USB/quirks -s 0x0bda:0x8153:0:0xffff:UQ_NET_IGNORE and then reboot for change to go into effect

      Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit 03/29/2023
  • ESXi configstorecli enhancement in vSphere 8.0 Update 1 03/28/2023
  • ESXi on Intel NUC 13 Pro (Arena Canyon) 03/27/2023
  • Quick Tip - Enabling ESXi Coredumps to be stored on USB 03/26/2023
  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...