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.
I saved this file to my desktop. It doesn’t seem to let you save to a network location.
You will need to initialize the disk
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.
Click “OK” when this window pops up.
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.
Boot up the Virtual Machine.