Solved

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

Posted on 2015-02-11
21
113 Views
Last Modified: 2015-03-09
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
0
Comment
Question by:Robert
21 Comments
 
LVL 22

Expert Comment

by:Bartender_1
ID: 40603971
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
0
 
LVL 29

Expert Comment

by:Sudeep Sharma
ID: 40604004
If you could post the IP details of your server and VM we could be able to help how to access them.

Sudeep
0
 
LVL 53

Expert Comment

by:McKnife
ID: 40604148
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.
0
 
LVL 38

Expert Comment

by:Philip Elder
ID: 40604332
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.
0
 

Author Comment

by:Robert
ID: 40604826
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
0
 
LVL 38

Expert Comment

by:Philip Elder
ID: 40605757
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.
0
 

Author Comment

by:Robert
ID: 40606575
Philip - not sure I am following your directions - am I missing some steps?
0
 
LVL 38

Expert Comment

by:Philip Elder
ID: 40606600
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. :)
0
 

Author Comment

by:Robert
ID: 40608082
No joy when clicking Apply.

Virtual Switch Manager fails to create a new v switch
0
 

Author Comment

by:Robert
ID: 40608089
Philip -

So at least one VM needs to be running, I take it?  I got it to create the switch.  Details, details!
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 38

Expert Comment

by:Philip Elder
ID: 40608118
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.
0
 

Author Comment

by:Robert
ID: 40621638
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?
0
 
LVL 38

Expert Comment

by:Philip Elder
ID: 40623585
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.
0
 

Author Comment

by:Robert
ID: 40626191
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?
0
 
LVL 38

Expert Comment

by:Philip Elder
ID: 40630698
Would put 1.5GB to 3GB depending on VM performance with LoBs. No fixed memory for either.
0
 

Author Comment

by:Robert
ID: 40646022
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!
0
 
LVL 38

Accepted Solution

by:
Philip Elder earned 500 total points
ID: 40646125
Please follow these instructions for setting things up: Hyper-V: Set Up An Internal Network For Host/Guest File and Service Sharing.

If the Internal vSwitch creation process fails then create a Private vSwitch first, then run the process for creating an Internal vSwitch and it should work.
0
 

Author Comment

by:Robert
ID: 40648316
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?
0
 

Author Comment

by:Robert
ID: 40648413
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.).
0
 
LVL 38

Expert Comment

by:Philip Elder
ID: 40648453
Good to hear.
0
 

Author Closing Comment

by:Robert
ID: 40655385
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.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
Detailed instructions on how to install an Access add-in in recent versions of Office and Windows (with screen shots)
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now