Quantcast
Channel: VMware Communities : Discussion List - ESXi
Viewing all articles
Browse latest Browse all 8132

Blacklisting certain USB devices from the usbarbitrator

$
0
0

Greetings!

 

I am using ESXi 6.7.0 Update 3 (Build 15160138) on an Intel Nuc to host my VMs wit the free ESXi hypervisor license.

The Nuc has an internal M2 SSD. As storage was running low, I've added another external SSD via a JMicron USB2SATA adapter.

 

Basically I was following this guide: https://www.virten.net/2016/11/usb-devices-as-vmfs-datastore-in-vsphere-esxi-6-5/

 

So, disabling usbarbitrator, adding SSD as storage device, etc.

 

Everything works as expected.

 

However, now I cannot anymore passthrough USB devices into a VM as the arbitrator service is no longer running:

 

[root@esxi:~] esxcli hardware usb passthrough device list

Bus  Dev  VendorId  ProductId  Enabled  Can Connect to VM                  Name

---  ---  --------  ---------  -------  ---------------------------------  -------------------------------------------------------------------

1    2    76b       3021          true  no (usbarbitrator is not running)  OmniKey AG CardMan 3121

1    3    8087      a2a           true  no (usbarbitrator is not running)  Intel Corp.

1    4    152d      1561         false  no (usbarbitrator is not running)  JMicron Technology Corp. / JMicron USA Technology Corp. JMS561U

 

Specificially I would like to make the OmniKey CardMan available as an USB device in a VM. The JMicron device at the bottom is the adapter that connects my SSD via USB3.0 to the host.

 

Now, lets start the usbarbitrator again:

 

[root@esxi:~] /etc/init.d/usbarbitrator start

UsbUtil: Attempting to reserve for VMkernel USB adapter(s):

Errors:

Rescan complete, however some dead paths were not removed because they were in use by the system. Please use the 'storage core device world liommand to see the VMkernel worlds still using these paths.

usbarbitrator started

Hostd must be restarted to enable USB passthrough functionality on any VM. After hostd is restarted, to enable USB passthrough functionality oowered on VM, the VM must be powered off and powered on again.

[root@esxi:~] esxcli hardware usb passthrough device list

Bus  Dev  VendorId  ProductId  Enabled  Can Connect to VM  Name

---  ---  --------  ---------  -------  -----------------  -----------------------------------------------------------------------------------

1    2    76b       3021          true  yes                OmniKey AG CardMan 3121

1    3    8087      a2a           true  yes                Intel Corp.

1    4    152d      1561          true  yes                JMicron Technology Corp. / JMicron USA Technology Corp. JMS561U

 

This looks promising, as I am now apparently able to "mount" the Omnikey into a VM.

However, I can no longer access the UI anymore once the usbarbitrator has been restarted. I presume this is because the SSD/storage device is now kind of blocked.

As soon as I stop the arbitrator service again, the UI is responsive again.

 

So I assume I need to kind of mask/blacklist the JMicron adapter from the USB arbitrator so he allows the mounting of all the connected USB devices but NOT of the JMicron. The JMicron should not be arbitrated but be available exclusively to the host.

 

How can I achieve this? Which commands do I need to issue?

 

As the message on the screen states I also tried to restart the hostd service, however the ESXi was then no longer accessible at all, giving me an error when I opened the webpage:

 

503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x0000001987322480] _serverNamespace = / action = Allow _port = 8309)

 

After a reboot he UI was available again, but the arbitrator was again disabled.

 

I found these commands but am not sure whether this is the correct way to go: Re: Disable USB support on ESXi OS or BIOS, both?

 

You could disable the usb-storage module by using

 

   esxcli system module set -m usb-storage -e false

( followed by

  vmkload_mod -u usb-storage

or a reboot to make the change effective )

 

This would prevent the usage of any USB storage devices without affecting KVM.

 

I am not sure whether I can issue this command without doing any harm.

 

Kindly advise how to proceed.

 

Thank you!


Viewing all articles
Browse latest Browse all 8132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>