In this article we will show how to connect your USB hard drive to a virtual machine on a Hyper-V host. Using this technique, you can provide a virtual machinedirect access to a USB drive.
- Connect an external USB drive to the Hyper-V host. The disk will appear in a system and a certain drive letter will be assigned to it.
- Open the Disk Management (diskmgmt.msc) console, right-click the drive (the left column, in our example, the ID of the 30 GB USB drive is Disk 2) and select Offline.
- Run Hyper-V Manager and open the properties of the virtual machine, to which a USB drive needs to be connected. In the SCSI Controller section, add a new disk, indicating that it is physical (Physical hard disk). In the drop-down menu, choose our 30 GB drive.
- Open the virtual machine console or connect to it via rdp. Run the Disk Manager again. As we can see, the new disk has already appeared in the system. If its status is offline, right-click it and click Online. At this point the letters of the disk partitions are not assigned. To change this, right-click a partition on the drive and select Change Drive Letter and Paths in the context menu, and then assign any free drive letter to the partition.
That’s all! We have directly connected our external USB drive into Hyper-V virtual machine and now can use it.
Now let’s figure out how to safely remove such a USB drive if necessary.
Open Hyper-V Manager console and go to the virtual machine configuration window. In SCSI Controller, select a hard disk to be removed and click Remove. Save the changes. After that, you can physically remove the hard drive from the USB port of the Hyper-V host.