Storage optimize

Tips and tricks for USB support with Hyper-V

USB doesn't have to be a three-letter curse word with Hyper-V. Rickatron shares some tips and new options for working around a lack of USB support for Hyper-V.

The need comes up occasionally to attach a USB device to a virtual machine (VM). But with the current iteration of Hyper-V as well as Hyper-V “R3” that is coming with Windows Server 2012, currently in beta, the ability to directly connect a USB device is still a challenge as it is not supported.

To be fair, in my virtualization practice I have little desire to manage USB devices being attached directly to virtual machines, primarily, to ensure the VM can still migrate. There are situations where it is unavoidable. One example is USB license keys. As an administrator, these come up from time to time – but the last thing I want to do is avoid deploying a Hyper-V VM just for a license key. For Hyper-V VMs, we have some tricks that we can’t use in the vSphere world (See my recent post on adding USB devices to vSphere VMs).

The options have increased lately, specifically, as the Digi AnywhereUSB line of Ethernet-attached serial devices have added some larger and smaller units. This includes a 2-port as well as a 14-port model and models that provide both USB and serial devices. Figure A below shows the 14-port device:

Figure A

A USB device server by Digi

A USB device server by Digi

The real problem that is being solved here is Live Migration as well as the lack of USB support for Hyper-V. Live Migration would break the access to locally-attached USB devices, should Hyper-V support it. Further, the device servers will also allow multiple systems to connect. This means that the 14-port device pictured above can have up to 14 VMs connect to it for one USB device each. Should a VM need multiple USB ports, that won’t be an issue either.

The guiding principle with these devices is that the USB driver is extended to the Ethernet network, and the Digi device provides the USB port to the VM. In terms of performance, it won’t be as fast as a locally attached device on a physical system. So, this is not a solution to fill up a 2TB drive with data for a backup or such. It may, however, be a great use case for license keys, which some software may require.

Now, just to be clear, Hyper-V VMs can run from USB devices like a hard drive that contains the .VHD or .VHDX file, but the USB device isn’t directly accessible to the Hyper-V VM.

Do you have Hyper-V VMs that need USB devices connected to them? What tricks have you employed? Share your comments below.

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

6 comments
jacks
jacks

USB Redirector is not free. The 15-day evaluation is free.

tglynn
tglynn

I wanted to build a Server 2012 VM. W8 now has Hyper-V included and W8 (and 2012 Server) can mount ISO files direct, Solution to boot an ISO without needing to cut a DVD 1. Mount the ISO into the W8 file system (this is brillilant) as a drive 2. "Capture" the new drive from the Hyper V console 3 . VM them boots! This couldn't be simpler actually

kkreitma1
kkreitma1

There is a free program called USB Redirector which can establish a connection to a Virtual Machine, from a usb device such as a license key.

ecvanhorn
ecvanhorn

I looked in to the referenced product on the Digi site and printed the data sheet. It appears that all of the models support USB 2.0 only at 1.1 speeds. I think that this deserves to be noted as it rules out applications that would require 2.0 speeds. Don't get me wrong; these are cool products, just not as versatile as one would like.

mark.foreman
mark.foreman

To connect CAC readers for loging on to sites and apps or a portal that require CAC logon. I have not found a way and would love to read any advice on how to get this to work.

equinoxau
equinoxau

Errrr, what has this go to do with ISO's??? We're talking support for USB devices, not just USB hard drives.