Use local resources on Hyper-V virtual machine with VMConnect
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows 11, Windows 10, Windows 8.1
Virtual Machine Connection (VMConnect) lets you use a computer's local resources in a virtual machine, like a removable USB flash drive or a printer. Enhanced session mode also lets you resize the VMConnect window. This article shows you how to configure the host and then give the virtual machine access to a local resource.
Enhanced session mode and Type clipboard text are available only for virtual machines that run recent Windows operating systems. See Requirements for using local resources.
For virtual machines that run Ubuntu, see Changing Ubuntu Screen Resolution in a Hyper-V VM.
Turn on enhanced session mode on a Hyper-V host
If your Hyper-V host runs Windows 10 or Windows 8.1, enhanced session mode is on by default, so you can skip this and move to the next section. But if your host runs Windows Server 2016 or Windows Server 2012 R2, do this first.
Turn on enhanced session mode:
Connect to the computer that hosts the virtual machine.
In Hyper-V Manager, select the host's computer name.
Select Hyper-V settings.
Under Server, select Enhanced session mode policy.
Select the Allow enhanced session mode check box.
Under User, select Enhanced session mode.
Select the Allow enhanced session mode check box.
Click Ok.
Choose a local resource
Local resources include printers, the clipboard, and local drive(s) on the computer where you're running VMConnect. For more information, see Requirements for using local resources.
To choose a local resource:
Open VMConnect.
Select the virtual machine that you want to connect to.
Click Show options.
Select Local resources.
Click More.
Select the drive that you want to use on the virtual machine and click Ok.
Select Save my settings for future connections to this virtual machine.
Click Connect.
The path to the local drive shared to the virtual machine, in a Windows-based guest VM, is located at This PC under Redirected drives and folders. The path for a Linux-based guest VM is located at /home/shared-drives.
Edit VMConnect settings
You can easily edit your connection settings for VMConnect by running the following command in Windows PowerShell or the command prompt:
VMConnect.exe <ServerName> <VMName> /edit
Note
An elevated command prompt may be required.
Requirements for using local resources
To be able to use a computer's local resources on a virtual machine:
The Hyper-V host must have Enhanced session mode policy and Enhanced session mode settings turned on.
The computer on which you use VMConnect must run Windows 10, Windows 8.1, Windows Server 2016, or Windows Server 2012 R2.
The virtual machine must have Remote Desktop Services enabled, and run Windows 10, Windows 8.1, Windows Server 2016, or Windows Server 2012 R2 as the guest operating system.
If the computer running VMConnect and the virtual machine both meet the requirements, you can use any of the following local resources if they're available:
Display configuration
Audio
Printers
Clipboards for copy and paste
Smart cards
USB devices
Drives
Supported plug and play devices
Why use a computer's local resources?
You may want to use the 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.
See also
Should I create a generation 1 or 2 virtual machine in Hyper-V?