Accessing USB Drives in a Hyper-V VM
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!
Comments
Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
GreatAnonymous
January 01, 2003
Worked for me. Thank you! Made my day easier.Anonymous
March 19, 2013
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 www.gokhancanpolat.com/.../mount-usb-hyper-v-virtual-machine Regards, GökhanAnonymous
March 26, 2013
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.Anonymous
March 26, 2013
The comment has been removedAnonymous
May 13, 2013
The comment has been removedAnonymous
October 14, 2013
I also don't have "Offline option". Someone know why?Anonymous
December 10, 2013
Worked like a charm for me thanks!!!Anonymous
February 06, 2014
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 this ?Anonymous
April 21, 2014
This worked perfectly for me and an External USB drive. I could offline it no problem. I think they were probably click in the in the wrong area.. it isn't in a drop down you have to click on the side where it reads the drive letter and it worked perfectly. This saved me a lot of money. Thanks.Anonymous
April 29, 2014
Thanks for this instruction. It works quite good.Anonymous
June 10, 2014
The first step worked for me, i.e.: Taking the USB drive offline. but then doesn't show up in the VM - offline or otherwise. Even after re-booting the VM no luck. Any idea why? I'm running W2k8R2 on both the Server and VM.Anonymous
June 18, 2014
I would suggest that try installing WinSCP (SFTP and FTP client) on Windows 8 host-OS to easily access the data files from your Hyper-V's virtual machine.Anonymous
August 26, 2014
This wasn't working for me on XP client. Come to find out SCSI Controller is not supported for XP. Using IDE Controller instead worked perfectly.Anonymous
October 17, 2014
Perfect! Worked like a charm!Anonymous
November 18, 2014
Excellent! Thank you so much!Anonymous
January 18, 2015
this works like a charm. The key is to right click on the description section of the drive, not the partition UI section. Thanks.Anonymous
January 22, 2015
Or you can share it over network. On host open USB drive properties. On Sharing tab setup Advanced sharing, choose name and check permissions. On VM right click on Computer > Map network drive and select your USB drive.Anonymous
January 30, 2015
For me:
If I plug USB thumb drive then Offline option is not available
If I plug USB External drive which has 2.5" or 3.5" hard-drive then Offline option is available
Works with the USB External drive which has 2.5" or 3.5" hard-drive !!!
thank youAnonymous
February 01, 2015
thanks
for sharing this articleAnonymous
February 09, 2015
Thanks, helped me a lot. too easy,Anonymous
February 12, 2015
thanksAnonymous
March 20, 2015
This saved me after 5 hours of searching all over the internet !!!
Thank you so !Anonymous
April 07, 2015
No, USB stick driver (not USB hard drive) can't be taken offline.Anonymous
April 12, 2015
Thank u very much, worked perfectly.Anonymous
June 17, 2015
Hi I did the steps.but in the last step when Im trying to make my external hard disk online it says access is denied.
whats the problem?
help me please.Anonymous
June 17, 2015
Hi I did the steps.but in the last step when Im trying to make my external hard disk online it says access is denied.
whats the problem?
help me please.Anonymous
June 17, 2015
Hi I did the steps.but in the last step when Im trying to make my external hard disk online it says access is denied.
whats the problem?
help me please.Anonymous
June 17, 2015
Hi I did the steps.but in the last step when Im trying to make my external hard disk online it says access is denied.
whats the problem?
help me please.Anonymous
June 21, 2015
Thank you.......Anonymous
July 13, 2015
Strangely enough, I had the drive show up as an unknown device in windows 8.1 VM, I had to force the generic "disk drive" driver and it worked.Anonymous
July 17, 2015
Perfect - works beautifullyAnonymous
August 21, 2015
Thank you. I think this works only for NTFS formatted drives...The subject is covered on Page 200-201 in the Hyper-V resource kit bookAnonymous
August 31, 2015
Worked a treat.. Thank you..Anonymous
September 03, 2015
Files should be easy enough if the VM can be on the internet.... Install google drive! Not tried it yet but I will soon pretty sure it's the perfect solution! ;-)Anonymous
September 15, 2015
well done Sir.Anonymous
September 19, 2015
The comment has been removedAnonymous
September 19, 2015
Fantastic! Very helpful!Anonymous
October 15, 2015
The comment has been removedAnonymous
October 15, 2015
GET YOUR PROBLEM SOLVE TODAY WITH MY PROFESSION IN ANY SPIRITUAL SPELL OR ANY KIND OF PHYSICAL BATTLE THAT NEED, MY NAME IS DR SYLVESTER AND THIS IS MY EMAIL FOR CONTACT (stbenson391@gmail.com) OR YOU CAN FOLLOW HIM UP ON FACEBOOK BY MY NAME (SYLVESTER E BENSON) ON FACEBOOK OR CALL ME ON MY MOBILE NUMBER +2348136090988, AM ALWAYS AVAILABLE TO RENDER YOU HELP WITH EXPERIENCE OF 32 YEARS IN SPELL CASTING AND HERBAL MEDICURE TO CURE ANY KIND OF DISEASE THAT YOU MAY HAVE, CONTACT ME ON ANY KIND OF ISSUES.Anonymous
October 23, 2015
No "offline" option in Windows 10 - Got a workaround?Anonymous
October 23, 2015
Also from Win 10:
DISKPART> select disk 1
Disk 1 is now the selected disk.
DISKPART> offline disk
Virtual Disk Service error:
The operation is not supported on removable media.Anonymous
November 08, 2015
Thank you so much.it worked for meAnonymous
February 18, 2016
Superb... worked perfectly.Anonymous
February 18, 2016
The comment has been removed