VMware Communities
cbreuser
Enthusiast
Enthusiast

Managing passthru for USB to workstation desktop

Hello,

We have a requirement to control the type of USB devices are passed through to a desktop using vmware workstation. We want to be able to allow USB passthru for mass storage devices but block the use of USB Ethernet adapter's being passed through to the desktop from the laptop. is there as way to specify the PID of a peripheral to create passthru rules?

Labels (3)
0 Kudos
2 Replies
bluefirestorm
Champion
Champion

You could try either or both of these in the VMX

By USB Class
usb.numClassRestrictions = "n"
usb.classRestrictions1.allow = "FALSE"
usb.classRestrictions1.classID = "USB Class ID"
usb.classRestrictionsn.allow = "FALSE"
usb.classRestrictionsn.classID = "USB Class ID"

By Device
usb.numClassRestrictions = "n"
usb.DeviceRestrictions1.allow = "FALSE"
usb.DeviceRestrictions1.vendorID = ""
usb.DeviceRestrictions1.productID = ""
usb.DeviceRestrictionsn.allow = "FALSE"
usb.DeviceRestrictionsn.productID = ""
usb.DeviceRestrictionsn.vendorID = ""

I tried the Class restrictions and it seemed to worked on Workstation Pro 16.2.5 on an Ubuntu host
usb.numClassRestrictions = "2"
usb.classRestrictions1.allow = "FALSE"
usb.classRestrictions1.classID = "0xE0"
usb.classRestrictions2.allow = "FALSE"
usb.classRestrictions2.classID = "0x08"

This disallowed connecting bluetooth module (0xE0) and USB flash drive (0x08).

I would think USB Ethernet class ID would be 0xEF; see this https://www.usb.org/defined-class-codes

The Class would be broad and blunt while the blocking by Device would be like a game of whack-a-mole.

You might also try setting it in the config file for machine-wide setting instead of vmx so that it doesn't have to be applied for every VM.

 

 

0 Kudos
bluefirestorm
Champion
Champion

Have to correct myself,

the number starts from to 0 throught o n - 1 in the allow/classID restrictions.

So the example should have been

usb.numClassRestrictions = "2"
usb.classRestrictions0.allow = "FALSE"
usb.classRestrictions0.classID = "0xE0"
usb.classRestrictions1.allow = "FALSE"
usb.classRestrictions1.classID = "0x08"

0 Kudos