Link to home
Start Free TrialLog in
Avatar of Robert
RobertFlag for United States of America

asked on

Hyper-V Virtual Machines - how to access files, folders, drives on the host PC

I have a Win 8.1 Pro 64-bit PC and I've installed Hyper-V.  I have created a Win 7 32-bit VM, and set it up without a network connection.  Looks great so far!

How do I access the "real" drives/partitions of the host Win8.1 PC or transfer files between the host and the Win 7 VM?

And, FWIW, I'll be creating a Win XP VM, as well.  I will need to move files back & forth there, too.

Help!

ub
Avatar of Bartender_1
Bartender_1
Flag of Canada image

Hello,

Basically, you would configure the networking for the guest and host to communicate with each other,
Please see here:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/ba1d4fdf-9eee-46ae-bdc8-fcbc807b1d0f/how-can-i-access-the-host-file-system-from-a-hyperv-image?forum=winserverhyperv

or you would configure a pass through disk,
Please see here:
http://blogs.technet.com/b/askcore/archive/2008/10/24/configuring-pass-through-disks-in-hyper-v.aspx

Hope this helps!

:o)

Bartender_1
If you could post the IP details of your server and VM we could be able to help how to access them.

Sudeep
You can use copy and paste. I cannot test right now because I don't have any more win7 test machines. It works with 8.1, simply copy on your host and paste on your target Hyper-V-VM. It's using the Hyper-V-pseudo-RDP for data transferring, no network connection is needed here.
Set up an EXTERNAL virtual switch that is shared with the host OS.

Bind that vSwitch to your VM(s).

If there is a DHCP service on the network shared with the host then the VM will pick up an IP address. You are able to connect to any resource on the network at that point.

Or, you can assign a static IP address to the VM if required.

Another option is to create an INTERNAL virtual switch. This will allow communications between the host and the guests only while restricting all other network traffic to VMs on that same INTERNAL vSwitch.
Avatar of Robert

ASKER

My "server" is a Windows 8.1 Pro PC.  I'm trying to run legacy applications as well as provide a one-icon click to transfer VM files back to the host for a more proper backup.

An Internal Network, ah "switch," is it?  That's what I'm looking for.  Not to the Internet, simply to the drive(s, in my case) on the Win8 PC.  So - I'll google that for now, but anyone know the steps to set that up?

I love that I could copy & paste, that's easy, but a more direct connection would really be the ticket.

Appreciate all the responses & guidance so far!

ub
Hyper-V Manager --> R.Click ServerName --> Virtual Switch Manager --> New --> INTERNAL.

Note the description for the internal vSwitch.

Assign a static IP to the newly created INTERNAL network (host --> Start --> NCPA.CPL --> INTERNAL Properties --> IPv4.
Assign a static IP to the vNIC in the VM after assigning the INTERNAL network to it.
Use a unique subnet for these two IPs.

On the guest: Windows Explorer --> \\HostIP\ --> Log on DOMAIN\Username or HostName\Username
On the host: Windows Explorer --> \\GuestIP\ --> Log on DOMAIN\Username or GuestName\Username

You will then be able to copy and paste between both host and guest.
Avatar of Robert

ASKER

Philip - not sure I am following your directions - am I missing some steps?
Robert,

I posted a blog post with a better outline with snips of each step after writing the above. MPECS inc. Blog: Hyper-V: Set Up An Internal Network For Host/Guest File and Service Sharing.

That should help clarify things a bit. :)
Avatar of Robert

ASKER

No joy when clicking Apply.

User generated image
Avatar of Robert

ASKER

Philip -

So at least one VM needs to be running, I take it?  I got it to create the switch.  Details, details!
Not sure about the question?

Once the INTERNAL vSwitch is created you can assign it to one or more VMs as per your need. If there will be a number of VMs coming in and out of that network a small DC VM with DHCP enabled may be a good idea.
Avatar of Robert

ASKER

Philip,

Sorry, my PC began crashing with irregularity and had to deal with it.  Will return to Hyper-V.

Was able to create that switch, though I'd be hard-pressed to remember the steps to get it going.  Those were the details I was looking for.

And if I can just ask, before I create my next VM, is there some way to tell it to just use necessary memory instead of blocking out X GBs as I did in the 1st try?
You can set the VM to use Dynamic Memory within the VM's settings. However, one needs to keep in mind what is and is not compatible with dynamic memory in a VM setting.

In our experience Exchange and SQL do not like having dynamic memory nor does SharePoint.

We tend to use fixed memory for all VMs.
Avatar of Robert

ASKER

How much fixed memory would you use for a Win7 VM?  Or an XP version?  In either case, I would be using these VMs to test or use legacy software & hardware and would not be running web apps at all.  I might also create one to put the Win10 preview in it.

For example, the XP VM would have WordPerfect and Access V 2.0 on it.  Would dynamic memory be OK for this?
Would put 1.5GB to 3GB depending on VM performance with LoBs. No fixed memory for either.
Avatar of Robert

ASKER

OK - back to the original question.  

Is there a step-by-step guide to creating a Windows 7 or Windows XP VM using Hyper-X that can share a folder?

Details
After using the Win8 Refresh feature, I had to re-enable Hyper-V.  I don't have that Win7 VM anymore.  At least, I don't think so.

After enabling Hyper-V (and rebooting, I created an Internal Virtual Switch  (but I think I will need to create an External one so my copy of Windows can be Activated).  Can I Phone-Activate WinXP without the VM being connected to the Internet?

In other words, I did create a VM and installed WinXP Home SP3 but did not bother to activate as it is not connected to the Internet.  

On the Win8 PC, I've shared a folder and gave Everyone full privileges on the Private (my Home) Network.

When I go into the WinXP VM [Device Manager], there are no network resources.  Since it is virtual, how do I get the WinXP VM talking to the host?  More specifically, reading & writing to that shared folder?  Or perhaps sending a document to the printer?

Help!
ASKER CERTIFIED SOLUTION
Avatar of Philip Elder
Philip Elder
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robert

ASKER

I am trying to follow your directions.  How do I get Step 4 On the HOST: Start –> NCPA.CPL [Enter] –> Set an IPv4 IP Address to bring up what you show in the screen?
Avatar of Robert

ASKER

OK, I got it.  Took some time to figure out the steps (what you meant by.... and how I should get there) but I got the network adapter added and the Virtual Switch added and the right IP addresses - can't use the same address for the host and the guest.

I could log in using the host's credentials (only one user on this PC) and see the shared folder.  I mapped it to a drive letter.

Now, I'll try to grab my printer drivers as a downloadable file as I am still using the Internal Switch.  My Kodak printer by default uses the Internet connection to pull the files during installation, as many installs do these days (Google, Firefox, e.g.).
Good to hear.
Avatar of Robert

ASKER

I really struggled with the guidance.  I did not find the "How to" easy to follow.  After having made it through, though, I can see that all the information is indeed correct.  I feel it could improve with additional steps, as I'd bet there are other less experienced (with Client Hyper-V) techies out there that just-want-to-run-legacy-apps within a Windows 8 PC.

And I'm sure we'll want to run them on Win10, as it seems to be headed down the rails, ready or not!

Thanks, Philip Elder, for working with me.