In an operational virtual machine, its window becomes the system’s active window, making it impossible to access USB devices attached to the host computer. USB devices can be redirected from the host to the guest OS, but this is not an ideal solution and can be limited by the number of USB ports available to the virtual machine.
USB Network Gate employs advanced port virtualization technology to enable the sharing of any USB device in a virtual environment. VMware USB passthrough can be easily configured with this dedicated software tool.
Even devices that cannot be redirected by native methods can be shared with USB Network Gate. An example can be seen when attempting to use a keyboard or mouse with a bootable HID interface from VMware ESXi. Native methods are not sufficient to redirect these devices nor other peripherals such as video and audio devices which demand coordinated signal processing. The use of USB Network Gate eliminates this problem.
How to passthrough any USB device to virtual machine with USB Network Gate?
- Install USB Network Gate on the real and virtual machines.
- Share a USB device on a physical computer which will be the server. This can be the local machine or any network-attached computer.
- Connect to the shared USB devices from the virtual machine which will be the client.
- The virtual machine will recognize the USB device and present it in Device Manager. The USB peripheral can now be used as if it were directly connected to the virtual machine that you are using.
The unique ability of this method
Enabling any USB device to be forwarded over a local network, Ethernet, or the Internet. This allows VMware workstation USB passthrough to be enacted without any USB devices physically connected to the host machine. Simply installing USB Network Gate on the host and guest machines is all you need to use USB devices in VMware.
This unique ability provided by USB Network Gate opens new opportunities for connecting virtual environments over the network and can be instrumental in working with POS devices, industrial automation systems, and many other applications. Enabling VMware to access USB devices in a simple manner expands the utility of your virtual machines and peripheral devices.
How to connect USB to VMware virtual machine
- When a virtual machine’s window is active, peripheral devices that are attached to the host computer are automatically connected to the guest system rather than the host. (This feature can be disabled by turning off auto connect in the USB Controller panel in the Virtual Machine Settings Editor.)
- If all of the virtual machine’s USB ports are occupied when the device is connected, you will be presented with a dialog box. Your options are to free a port by disconnecting one of the USB devices or to ignore the new device. If you choose to ignore the device, it is connected to the host machine.
- Specifying which USB devices should be connected to your virtual machine is done through the VM > Removable Devices panel.
Note: The maximum number of devices that can be connected at once is two. Using a hub does not impact this number, as the virtual devices are detected, not the hub.
- Each USB port has a menu which displays the devices that are connected to the host and available to the guest virtual machine. Hovering your mouse over the menu item enables you to click on the device with which you want to connect. In case a device is attached to that port, clicking on a new device releases the first peripheral and connects to the newly selected one.
- Releasing a device is done by selecting a port to which it is connected and choosing None in its menu.
- If the auto-connect feature was disabled when a device is attached to the host machine, you can manually connect it through the VM > Removable Devices menu.
VMware workstation USB passthrough
Here is how to connect USB to virtual machines running on VMware Workstation.
By default, devices attached to the host machine are connected to the VM rather than the host.
If the device does not connect to the VM, you need to redirect the USB device manually. You may also need to do this after powering the VM off or unplugging and re-attaching the device.
Workstation should retain the connection to the host machine’s USB port, but if the device does not reconnect and is still available you can redirect it manually by selecting VM > Removable Devices > Device Name > Connect, which will disconnect it from the host.
Follow these steps to redirect USB devices to VMware ESXi
- Log into your VMware vSphere Web Client and access your virtual machine Inventory.
- Open the list of virtual machines and select the machine that requires access to USB devices. Right-click and select the “Edit” settings.
- Select the “New device” menu and “Host USB device”. Select the “Add” option.
- Now select the device to be added from the drop-down list displayed.
Mounting a USB drive to Hyper-V
The Hyper-V virtual environment allows the connection of a USB drive to be used as a virtual storage device. In order to accomplish this, you need to know the size of the drive to be attached. You can find this value by using the host machine. Click on “Computer” and locate the removable drive. Right-click and select “Properties”. The “General” tab provides information regarding the capacity of the hard drive.
Installing a USB drive as a virtual hard drive:
- Right-click on the Hyper-V server and select New > Hard Disk. This can also be done from the “Actions” menu.
- Click “Next” when prompted to enter a name for your drive.
- Choose “Copy the content of the specified physical dis” and enter the identifying details of the disk.
Note: The copy process can take some time depending on the size of the removable drive. A USB.vhd file is created that encompasses the complete capacity of the storage device. It does not distinguish between used and free space.
- Select “Settings” on the virtual machine. In the left panel, choose SCSI Controller and Hard Drive in the right panel, then click “Add” as shown below.
- Click “Browse” and select the vhd file that represents the removable storage. The contents should be displayed as a drive.
The drive should be visible in “My Computer”. If it does not appear, it may be that the device is offline. Check it by going into the VM and right-clicking “Computer”, choose “Manage” or “Administrative Tools” and go to “Computer Management”. Expand the storage selection and choose “Disk Management”. Offline disks are identified by a red arrow icon. Right-click on the disk and choose “Online”. When the disk is online, it will be assigned a drive letter.
Drawbacks to this method. The sequence of actions will need to be repeated for each USB drive you wish to connect to the Hyper-V virtual environment. This can be time-consuming as each device must be copied to a vhd file.