Published by

Brink's Avatar

Posts: 15,692

Show Printable Version 

How to Use Local Devices and Resources on Hyper-V Virtual Machine in Windows 10

information   Information
Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical computer systems, however they exist in a virtualized and isolated environment.

You can give a virtual machine access to a computer's local resources, like a removable USB flash drive, when you use Virtual Connection Manager (VMConnect). To make this happen, turn on enhanced session mode on the Hyper-V host, use VMConnect to connect to the virtual machine, and before you connect, choose the local resource that you want to use.

Enhanced session mode provides the following new capabilities for Virtual Machine Connection sessions:
  • Display Configuration
  • Audio redirection
  • Printer redirection
  • Full clipboard support (improved over limited prior-generation clipboard support)
  • Smart Card support
  • USB Device redirection
  • Drive redirection
  • Redirection for supported Plug and Play devices

You might want use a computer's local resources to:
  • Troubleshoot a virtual machine without a network connection to the virtual machine.
  • Copy and paste files to and from the virtual machine in the same way you copy and paste using a Remote Desktop Connection (RDP).
  • Sign in to the virtual machine by using a smart card.
  • Print from a virtual machine to a local printer.
  • Test and troubleshoot developer applications that require USB and sound redirection without using RDP.

This tutorial will show you how to use local drives, devices, and resources on a Hyper-V virtual machine with enhanced session mode in Windows 10.

Note   Note
To be able to use a computer's local resources on a virtual machine:

EXAMPLE: Local devices and resources on Hyper-V VM from host PC
Click image for larger version. 

Name:	Host_PC.png 
Views:	21 
Size:	51.6 KB 
ID:	93212
Click image for larger version. 

Name:	VM.jpg 
Views:	28 
Size:	156.1 KB 
ID:	93211

Here's How:

1. Open Hyper-V Manager.

2. Select the Hyper-V host (ex: "BRINK-DESKTOP") in the left pane, double click/tap on the virtual machine (ex: "Non Insider W10") that you want to connect and use enhanced session mode to use local devices and resources on. (see screenshot below)

Click image for larger version. 

Name:	Hyper-V_Manager.jpg 
Views:	31 
Size:	125.0 KB 
ID:	93227

3. Click/tap on the Start button to start the virtual machine (ex: "Non Insider W10"). (see screenshot below)

Name:  Start.png
Views: 399
Size:  18.3 KB

4. Click/tap on Show Options in the VMConnect dialog when it automatically opens. (see screenshot below)

Name:  Hyper-V_Enhanced_Session_Local_Resources-1.png
Views: 398
Size:  25.8 KB

Note   Note
If you don't see the VMConnect dialog and the virtual machine is currently running without enhanced session, then click/tap on View on the menu bar of the virtual machine, and click/tap on the unchecked Enhanced session to open the VMConnect dialog.

Click image for larger version. 

Name:	Hyper-V_Enhanced_Session.jpg 
Views:	20 
Size:	171.7 KB 
ID:	93213

If you don't see the VMConnect dialog and the virtual machine is currently running with enhanced session (checked), then open an elevated command prompt, type the command below, and press Enter to open a new connection for the virtual machine with the VMConnect dialog. Close the command prompt and the other virtual machine connection without the VMConnect dialog.

vmconnect localhost "VM name" /edit

NOTE: Substitute VM name in the command above with the actual name (ex: "Non Insider W10") of the virtual machine.

For example: vmconnect localhost "Non Insider W10" /edit

Click image for larger version. 

Name:	vmconnect.png 
Views:	19 
Size:	14.0 KB 
ID:	93214

5. Check or uncheck the Save my settings for future connections to this virtual machine box for what you want. (see screenshot below)
Note   Note
If you check this box, this virtual machine will always automatically start in enhanced session mode using the VMConnect settings you set in the steps below.

If you want to uncheck this box later, you can use the second part with the command in the note box under step 4 above to edit the VMConnect settings of this virtual machine.

Name:  Hyper-V_Enhanced_Session_Local_Resources-2.png
Views: 404
Size:  16.0 KB

6. Click/tap on the Local Resources tab, and check or uncheck if you want to use the local PC's Printers and/or Clipboard in the virtual machine. (see screenshot below)

Name:  Hyper-V_Enhanced_Session_Local_Resources-3.png
Views: 402
Size:  19.6 KB

7. Click/tap on the More button. (see screenshot below)

Name:  Hyper-V_Enhanced_Session_Local_Resources-4.png
Views: 400
Size:  15.8 KB

8. Check or uncheck the boxes of the local PC's devices and resources for what you want to use in the virtual machine, and click/tap on OK. (see screenshot below)

Name:  Hyper-V_Enhanced_Session_Local_Resources-5.png
Views: 401
Size:  12.6 KB

9. Click/tap on Connect to start the virtual machine in enhanced session mode using the local PC's devices and resources that you checked. (see screenshot below)

Name:  Hyper-V_Enhanced_Session_Local_Resources-6.png
Views: 396
Size:  21.9 KB

That's it,