Virtualization FAQs, Tips, and Tricks – Virtualizing USB dongles

If you’ve been visiting my site lately, you’ll notice that I’ve been regularly posting a series of Virtualization FAQs, Tips, and Tricks as a follow-up to the TechEd 2011 VIR471-INT session.

Today’s installment deals with how you can virtualize a workload which requires access to a USB key, such as a software licensing dongle.

Thanks go to Aaron Sudduth for discovering this one. Aaron is the sysadmin on my team that discovered this solution, and he’s the one that did our initial installation and troubleshooting.

As discussed in the session, using software that requires a specialized USB license dongle isn’t actually a blocker for a workload that you’d like to virtualize. We’ve spent the last couple years virtualizing such workloads without issue.

The trick to making this work is to use USB over IP with a network-attached USB hub like the ones found here. The specific model we’ve been using is the
LTB AnywhereUSB/5 Gen 1
. It appears that this product is being discontinued and replaced with a much more expensive model for about twice the price (though it doesn’t appear to do anything differently that I can see), so we’re considering buying a couple to stock up before they totally disappear.

There are a lot of other models out there, but since we haven’t tested them, I can only say that I know this one works for anything we’ve tested.

How it works

The process is actually pretty straightforward. You hook this box up to your network and assign it an IP, and then you plug in your USB key. At that point, you just have to install a piece of software inside your VM, and it will connect to this box over the network and bring the USB key into Device Manager just like it was running locally. So long as you have network connectivity, you’ll continue to have access to the dongle.

Some gotchas to be aware of

First, it’s important to note that not all devices will work this way, but we’ve not found that didn’t. It’s probably worth testing if you’re not sure.

Second, this device comes up a little later in the stack, once network connectivity has been established. It’s possible that you have a service starting up which requires this dongle that may try to start before this device comes online. In that case, you need to setup your service to have a delayed start in order for this to all fall into place.

Third, Windows VMs don’t have the necessary drivers to use this out of the box (since VMs don’t have USB controllers) unless the VM was originally P2V’d, so you actually have to add those drivers before this will work.

Here are the notes from a Digi guide on how to make it work

The following workaround is required for installing an AnywhereUSB in a Virtual Machine:
1. Make sure Windows is configured to show file extensions. In My Computer, click "Tools / Folder Options" then click the "View" tab. Scroll down and uncheck "Hide extensions for known file types" (unless it's already unchecked) then click OK.
2. Search the Windows CD (that matches the OS of the Host PC) for a file called "usbd.sy_" (it should be in the i386 folder). For example, if the Host PC is running Windows 2003, then use a Windows 2003 CD.
3. Copy "usbd.sys_" and paste it in "c:\windows\system32\drivers" (or c:\winnt\system32\drivers for Windows 2000), then rename the file to "usbd.sys". Be sure to paste it in the "drivers" folder, not just "system32".
4. Open the AnywhereUSB Configuration Utility, click "View / Driver Information / Uninstall" and reboot the Virtual Machine when prompted.
5. After Windows loads, re-install the AnywhereUSB software and follow the normal installation procedure - you should go through a total of 5 found new hardware wizards, and the 5 port LEDs should be solid green once the AnywhereUSB is installed and connected to the Host PC.

Some additional support documentation from Digi can be found here

In summary, if you come across a workload that you’d like to virtualize, but don’t think you can because of a software dongle, check out this solution as a way to get that workload off of metal and into a VM!

If you have any questions, feel free to contact me via the links to the right.

Good luck, and happy virtualizing!

Download all of the TechEd videos via PowerShell – and even play them on iOS!

As I mentioned last week, I own a variety of devices on both the PC and Mac/iOS sides of the fence. When travelling, my preferred content consumption device far and away above all other devices is the iPad.
That’s why I was excicted to see that this awesome script by PowerShell MVP Marco Shaw could be modified with a simple find and replace to swap out all of the “WMV” references with “MP4”, and it flawlessly downloaded the whole TechEd repository to be drug over to my iPad right before I leave for vacation!

Many thanks to the folks at TechEd, the PowerShell team, and Marco for setting me up with my in-flight entertainment on this trip!

One gotcha for the those less seasoned in PowerShell – on the line:

try {Import-Module -Name OData -ErrorAction "Stop"}

You will likely need to point PowerShell to the path of the OData provider referenced in the post, or you’ll get an error.

For example:

Import-Module .\MyModule\OData.psm1

or

Import-Module c:\users\myuser\MyModule\OData.psm1

Good luck, and happy viewing!

Hyper-V FAQs, Tips, and Tricks – Post SP1 hotfixes

As promised, here’s the next post in the Hyper-V FAQs, Tips, and Tricks Series, following up from the TechEd 2011 VIR471-INT session. Today’s post discusses the most important hotfixes you need to make sure you have installed in your Hyper-V environment.

If you’re running W2K8R2SP1, there aren’t too many fixes to be aware of just yet, but there are a few fairly important ones:

The critical ones (in my opinion)

The important ones

Time is short today, so I won’t go into details on the bugs, but you can follow the links and find out if they apply to you.

Good luck, and happy virtualizing.