How to Copy and Transfer Files to between Hyper-V Host and VM

Situation: The client just upgraded one of their VM running Windows Server 2012 R2 to Windows Server 2019. The new Windows 2019 uses the same IP address and hostname of the old Windows 2012 R2. So, they disable the old server network to prevent conflict.

Now, they need some files from the old 2012 R2 server and wonder if we can help them to copy those files without conflicting the new server.

Resolution 1: Enable enhanced session mode and use Remote Desktop Protect

Enhanced session mode is simple way to transfer files between Host and VM using Remote Desktop Protocol (RDP). This feature doesn’t require network connection between Hyper-V host and guest VM.

  1. Enable Enhanced Session Mode Policy by going to Hyper-V Settings.

Check Allow enhanced session mode.

2. Right click on the VM which you want to transfer files and then Connect.

3. Click on Show Options

 4. Click on Local Resources and More.

5. Select the drive that you want to access on the VM, and click Ok.

6. Click on Connect

7. Now, File Explorer shows the Drive (C in our example) of the Host so that you can transfer files between host and VM.

Or you can copy and paste between the Host and VM without mapping the Drive.

Resolution 2: Mount the virtual hard disk to the host machine

1. Shut down the virtual machine first, then go to mount the VHD to the Hyper-V host by right clicking on the *.vhdx file. Click on Mount.

2. Virtual disk will show two folders in the Host File Explorer, for example System Reserved (G) and Local Disk (H) in our example.

3. Copy the files to the virtual hard disk as you want. When completed, right-click the mounted disk drive (H drive in our example) and select Eject to dismount the VHD.

Resolution 3: Create an Internal Virtual switch so that the Host and VM can talk each other.

Please refer to this post: How to Create a Virtual Switch on Hyper-V

Resolution 4: Use Veeam or other VM backup to backup and restore.

Please view this step by step Video:

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com