Winnipeg Photographer


How to copy files from Hyper-V host to clients

I’ve been doing a deep dive into hyper-V. While I think Microsoft has it’s leg up on VMWare with price and performance it’s still lacking in the tools arena. One thing I was wanting to do was transfer a file from the Hyper-V host to the Hyper-V client. The Hyper-V client machines were running in a different subnet then what my original machines were running in.

After doing some searching around I found a great article about setting up a private virtual NIC on both the Hyper-V Host and Hyper-V client and setting the IPs to the same subnet.

While this might be OK for some people I really miss the ability to just copy files from the host machine like I could in Virtual PC/VMware.

After day dreaming for a bit how this could be done I thought I remember seeing an option in Windows 7 Disk manager to not only CREATE but Mount VHD files. I then started thinking what if I create a VHD and then mount it. Copy the files to the VHD and then mount the VHD in the virtual machine.

It could be like using a networked USB Drive.

Open Disk Management in Windows 7. Create VHD.

How to copy files from Hyper-V host to clients 01

I saved this file to my desktop. It doesn’t seem to let you save to a network location.

How to copy files from Hyper-V host to clients 02

You will need to initialize the disk

How to copy files from Hyper-V host to clients 03

How to copy files from Hyper-V host to clients 04

How to copy files from Hyper-V host to clients 05

This will walk you through the volume and format wizard. I am assuming you have experience with this.

Copy the files you want on the virtual disk drive.

You will need to “detach” the VHD drive in Drive Manager.

How to copy files from Hyper-V host to clients 06

Click “OK” when this window pops up.

How to copy files from Hyper-V host to clients 07

Copy this VHD to the Hyper-V Host. I like to put it in a shared directory I use for media. ie. iso’s & vhd’s etc.

Open the properties of the virtual machine.

Add a Hard drive. Point the wizard to where ever you copied the newly created VHD.

Hit apply.

Boot up the Virtual Machine.


3 Responses

  1. Fantastic, easy walk through. I’ve been looking for a How To on this for a while. Thanks again!

  2. Joe on March 5th, 2012 at 12:59 pm
  3. Thank you for the easy to follow tutorial. very helpful.

  4. Jose on October 26th, 2012 at 1:20 pm
  5. Great article, thanks for publishing.

    I am having one problem though. I can create, add to an disconnect the VHD just fine from the host OS (WS08 R2 SP1) but when I try and attach it to the VM I get the error

    “Error Applying Hard Drive Changes
    Failed to add device ‘Microsoft Synthetic Disk Drive.
    Cannot attach storage media to the controller because the specified location is in use.”

    I confirmed that I did indeed detach the VHD from the host so I am not sure why it is showing “in use”.

    Any thoughts?

  6. Andy on June 27th, 2013 at 5:41 am

Leave a Reply