Page 1 of 1

USB devices running in Open Indiana 151a Zone

Posted: 12. Feb 2012, 16:35
by finnland
Hello.
Has anyone gotten USB to work within a zone in OpenSolaris or OpenIndiana? I've done the small thing mentioned in chapter 2 in the manual i.e added vboxusbfilter to device match but still vbox reports no devices attached. VBoxManage list usbhost shows <none> inside the zone but shows my device in global.
Tried to change the permissions on the device node but with no difference. The zoneservice is also running in global. Virtualbox otherwise works well within the zone but I need access to USB for one of the virtual machines.

Thanks.

Henrik

Re: USB devices running in Open Indiana 151a Zone

Posted: 13. Feb 2012, 16:54
by Ramshankar
I'm not sure if this will work but if you're willing to try read on..

When a USB device is plugged in and captured by the VBoxUSB driver it creates a minor node (on the fly) for the device which is then ultimately exposed to the userland VBox process. The userland VM process here is running in a zone.

The /dev/vboxusbmon node is simply the manager node (listing USB devices, etc.), the actual USB device node that the VM needs to talk to the VBoxUSB driver will be one inside /devices. Like /devices/pci@X,Y/pciVID,PID@A,B or similar. If you plug your device into the same physical port that would mean VBoxUSB creates the same device node path everytime for your device. You could then create a symbolic link, creating a "/dev/myvboxusbdevice -> /devices/pci@X,Y/pciVID,PID@A,B" in the global zone (as local zones cannot access /devices) and then exposing /dev/myvboxusbdevice to the local zone.

You can see the device path being used by checking /var/adm/messages as the vboxusb driver will display the device node path for a captured device example:
vboxusb: Captured USB Disk serial:vid:pid:/path

So in theory exposing the right node(s) to the zone *should* be enough, but I haven't tried this.