VMware Communities
Karol_Berlinski
Contributor
Contributor

Is there a way to add USB Arbitrator rule via CLI?

As in topic, I'm searching for a way to modify /Library/Application\ Support/VMware/usbarb.rules file while vmware-usbarbitrator is running. I'm interested in a way other than GUI (Settings window).

Short use case description:
We have (quite a few) hosts to which we connect multiple USB devices (multiple devices per host). Currently, we're configuring USB passthrough by providing USB autoconnect configuration inside vmx files, we have multiple USB devices per host, multiple VMs running and only one USB device is mounted to a single VM.  But when USB is configured this way after some actions inside VM that force USB reconnection the device gets kicked out of VM and stays on the host (it is visible inside VM in system_profile SPUSBDataType output, but cannot be used).
I found out that if, instead of using autoconnect, I use usbarb.rules file - reconnection problem does not exist. The tricky part is we're creating VMs on the fly when a new USB device is connected to the host. When I change contents of usbarb.rules file when the service is running the changes are not reflected, when I kill the service - the file is reverted to the prior version. So the only way I found is to kill the service, modify the file, start the service. This would be ok with a single device, but having multiple killing usbarbitrator service means that other VMs have their USB disconnected till service is back up again. I can see that file changes when I use UI to set the usb rules.

Configuration:
Host OS: macOS Big Sur (11.6)
Guest OS: macOS Big Sur (11.6)
VMWare Fusion version: 12.2.0

0 Kudos
0 Replies