Even if you don't work in a highly secure environment, you likely have a USB stash of utilities just as I do. Sure, I could copy the data from my USB to the VM or host but that takes time and unnecessary disk space or network bandwidth. Instead, I use a method suggested to me by one of my mentors, Mark Ghazai, to pass the USB drive through to the VM directly. This gives me instant access to the data without the extra network or disk space usage!
Target: Access USB drive from Hyper-V VM
Kill Shot: Use disk Pass-through method to present the USB drive directly to the VM
After you plug in your drive, open up disk management so you can take the USB drive offline
Right-click on the drive and select Offline
The drive should appear offline as seen below on your Hyper-V host where the VM is located
Now open up the settings on the VM you want to have access your USB drive. (note, you must have a SCSI controller available to add a drive to a running VM)
Click Add and select Physical hard disk: then choose your USB drive in the drop down. Click Ok
Now, log into the VM and open Disk Management. You should see the drive listed as offline. Right-click and select Online
You should now see the disk listed as online and accessible (note, my file system shows unknown because my drive is encrypted!)
If you open windows explorer, you should now see your USB drive listed
Special Thanks to Mark Ghazai for suggesting this!
Great article, thanks a lot HollisWms.
It didn't work for me, bu it helped me to find another easy way to mount a USB drive to VM on Hyper-V.
Check it out
didn't work for me either. Removeable drives don't have the Offline option. The procedure works though if you want to connect a physical disk to a VM.
sorry, re the above, I was trying a USB flash drive. It may be ok with a USB external disk, but I don't have one handy to try.
looked good and easy, but did not work. I am not in server mode and runnig xp on hyper v in Windows 8 trying to back up data to a flash drive. Last step would not copy flash to a vxd file.
I also don't have "Offline option". Someone know why?
Worked like a charm for me thanks!!!
i think if you are using a usb flash pen it will not work.
This sounds good, but in my case it is not possible to put offline my usb drive. In disk management GUI, the option does not display, and at the commandline diskpart tells that taking offline is not supported for removable media. How can I work around