Link to home
Create AccountLog in
Avatar of BlearyEye
BlearyEyeFlag for United States of America

asked on

Access files on Hyper-V host from client

I have Win 8.1 Pro. I have a Hyper-V client (Vista Business) set up and running. Everything seems to be working except that I can't access files on the host.

In Hyper-V I've installed a internal virtual switch "Local share". Here I'm stuck. The host shows an Unidentified public network for "Local share". The client doesn't show the adapter or network. What do I have to do in order for the client to be able to access host files?
Avatar of Member_2_760301
Member_2_760301
Flag of Ireland image

Hi,

Are you using a public switch or a private one? You can share the content on the host machine and access with  \\host_name\share_name in Hyper-v if there is a public network configuration.
Avatar of BlearyEye

ASKER

It's an internal switch, not associated with any physical adapter. From stuff I saw online, that seemed to be the way to do it.

In the Hyper-V Virtual Switch Manager, the connection options are External network (with a physical adapter), Internal network and Private network. "Public" isn't an option.
It's ok. Then just check if you are in the same network class.

Cristian.
I don't know what a "network class" is or how I check. Google doesn't help me.
In host, Go to Start -> Run (Win+ R) and type CMD and hit enter. Command prompt should be displayed. Type ipconfig and now go up until you find your host's network adapter settings. You should be looking for details like:

IPv4 Address .... 192.168.x.x or 10.x.x.x or 172.x.x.x
Subnet
Gateway

Now let's assume you are using the the network ip class with 192.168.x.x and your ip is 192.168.0.100 and your gateway is 192.168.0.1.

Now in guest configure the network as manual and give the same gateway, subnet and a different ip, but in the same class  with the host:

192.168.0.110
255.255.255.0
192.168.0.1
you can leave dns automatic or just add the primary one: 8.8.8.8

Now you can access the host from guest with:
\\host\        <- type it in a new address bar in any folder.

Regards
OK. So, on the host PC, ipconfig gives me:
Ethernet adapter vEthernet (Local share):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::4cbb:1c7:3011:f32%28
   IPv4 Address. . . . . . . . . . . : 192.168.0.15
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (WiFi):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::6817:fcf9:9114:8ac5%24
   IPv4 Address. . . . . . . . . . . : 192.168.1.14
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
"Local share" is the one I'm trying to get working.

On the client, ipconfig gives me:
Ethernet adapter vEthernet (Local share):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::4cbb:1c7:3011:f32%28
   IPv4 Address. . . . . . . . . . . : 192.168.0.15
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (WiFi):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::6817:fcf9:9114:8ac5%24
   IPv4 Address. . . . . . . . . . . : 192.168.1.14
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
I see that "Local share" is there. However, it doesn't show up in the list of network connections when I try to access via Control Panel:User generated imageSo I'm not sure how to go about configuring it. Do I use netsh from the command prompt?
Doble click the Local area connection and click details. You should see the ip details there.
That's the "WiFi" connection. I don't think I want to mess mess around with that, do I? I'm trying to get the "Local share" connection going.
When the host and the guest are on the same network, you only need to modify the host's firewall and it will work. There is no special config inside the hyper-v properties or inside the guest machine's config/switch config needed, none at all.
Just do one netsh adjustment at the host's command line and that should be it:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes 

Open in new window

Afterwards, see if port 445 can be reached from the client like this:
telnet hypervhost 445

Open in new window

[afterwards, the command shell needs to go black...if the telnet client is not available, install it as windows feature at the client].

If 445 is open, shares will be accessible and only NTFS and share permissions will need to match, of course.
Thanks for your patience; sometimes life intervenes ... Anyway, still no joy. I did the netsh on the host, enabled telnet on the client, and tried to connect as you indicated. The telnet message was: "Connecting To hypervhost ... could not open connection to the host, on port 445: Connect failed."
Ok. Could you see whether the server has that port open? To do that, at the server side execute:
netstat -ano |findstr 445

What's the output (if any)?
If it shows it's listening on 445, could it be another firewall in between?
On the host, netstat reports
TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
TCP    [::]:445               [::]:0                 LISTENING       4

Open in new window


I added a rule to the host firewall. No connection. I disabled the firewall, same result.
Time for connectivity tests. Make sure nothing is in between.
OK. How do you suggest I proceed?
Connect your laptop to the management interface of the hyper-v host and do telnet again. Make sure the interface is used only for management.
I've stared at this two or three times and am very perplexed. Where did a laptop come in? We're talking about a virtual machine on a host. If I did have a separate laptop, how would I connect it to the management interface of the host? And how would I make sure that the interface is used only for hosting?
Just for a telnet test.
Still perplexed?
You need to find out why telnet is not seeing an open port. The easiest test/troubleshooting start would be, to connect a portable machine (that laptop) directly to the hyper-v-host servers management card and see if that port can be reached with telnet. If it is, the problem is not on the server but along the network road.
ASKER CERTIFIED SOLUTION
Avatar of Philip Elder
Philip Elder
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Thanks. I've gone thru the steps a couple of times and get stuck on #5. The adapter doesn't seem to be present on the client. Here are some screenshots.

Switch definition: User generated imageClient hardware: User generated imageHost IP Config: User generated imageNetwork connections on client: User generated image
Please publish IPConfig /ALL from host and guest.
Here you go

Host:

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Bill
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter vEthernet (Local Share):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
   Physical Address. . . . . . . . . : 00-15-5D-00-0A-08
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::b120:f0bf:6d50:f87e%20(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.99.100(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCPv6 IAID . . . . . . . . . . . : 1073747293
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-FA-EB-07-F0-DE-F1-AE-24-D1
   DNS Servers . . . . . . . . . . . : 8.8.8.8
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (WiFi):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
   Physical Address. . . . . . . . . : 74-DE-2B-8D-D9-83
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::6817:fcf9:9114:8ac5%17(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.4(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, April 22, 2015 6:15:34 PM
   Lease Expires . . . . . . . . . . : Thursday, April 23, 2015 10:15:33 AM
   Default Gateway . . . . . . . . . : 192.168.0.1
   DHCP Server . . . . . . . . . . . : 192.168.0.1
   DHCPv6 IAID . . . . . . . . . . . : 561307179
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-FA-EB-07-F0-DE-F1-AE-24-D1
   DNS Servers . . . . . . . . . . . : 64.233.222.2
                                       64.233.222.7
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (Ethernet):

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : F0-DE-F1-AE-24-D1
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 4:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hosted Network Virtual Adapter
   Physical Address. . . . . . . . . : 74-DE-2B-8D-D9-83
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : 74-DE-2B-8D-D9-83
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
   Physical Address. . . . . . . . . : 60-D8-19-BE-81-86
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{735E2037-DF74-4A83-9FF2-AA608DBDEEEC}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Reusable ISATAP Interface {A113D18D-F737-4F56-BC4C-B67CF82B1913}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
Guest:

Windows IP Configuration

   Host Name . . . . . . . . . . . . : VistaPC
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Emulated)
   Physical Address. . . . . . . . . : 00-15-5D-00-0A-02
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::245f:b198:e3ba:a9e4%8(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.15(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, April 23, 2015 5:22:24 AM
   Lease Expires . . . . . . . . . . : Thursday, April 23, 2015 6:22:24 AM
   Default Gateway . . . . . . . . . : 192.168.0.1
   DHCP Server . . . . . . . . . . . : 192.168.0.1
   DHCPv6 IAID . . . . . . . . . . . : 201332061
   DNS Servers . . . . . . . . . . . : 64.233.222.2
                                       64.233.222.7
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter Local Area Connection* 6:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : isatap.{4BA78411-D24D-4DCC-B9CB-F465F11DE931}
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::5efe:192.168.0.15%10(Preferred)
   Default Gateway . . . . . . . . . :
   DNS Servers . . . . . . . . . . . : 64.233.222.2
                                       64.233.222.7
   NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter Local Area Connection* 7:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 02-00-54-55-4E-01
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

HOST:
Ethernet adapter vEthernet (Local Share):

    Connection-specific DNS Suffix  . :
    Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
    Physical Address. . . . . . . . . : 00-15-5D-00-0A-08
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::b120:f0bf:6d50:f87e%20(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.99.100(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1
    DHCPv6 IAID . . . . . . . . . . . : 1073747293
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-FA-EB-07-F0-DE-F1-AE-24-D1
    DNS Servers . . . . . . . . . . . : 8.8.8.8
    NetBIOS over Tcpip. . . . . . . . : Enabled


GUEST:
Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix  . :
    Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Emulated)
    Physical Address. . . . . . . . . : 00-15-5D-00-0A-02
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::245f:b198:e3ba:a9e4%8(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.15(Preferred)


The host and the guest are not on the same subnet.
OK, so now I'm officially confused. Here's what I thought we were doing.

Host and guest should each have an Internet network connection. Host's connection is named "Ethernet adapter vEthernet (WiFi)" and has IP 192.168.0.4. Guest's connection is named "Ethernet adapter Local Area Connection" and has IP 192.168.0.15. They're both on the same subnet. They both can access the Internet.

Host and guest should have a separate network connection for sharing. Following your instructions (I thought), I set up "Ethernet adapter vEthernet (Local Share)" in Hyper-V Manager and gave it IP 192.168.99.100: deliberately on a separate subnet.

So where did I go wrong?
The ability to share data between guest and host is exclusive to the network path in the INTERNAL vSwitch. There is no need for an Internet connection or anything else. It is a direct connection.

Your host and guest are on different subnets on that network. They _can't communicate with each other!

Example IP Address Setup on the two NICS:
 Host IP: 192.168.16.200
 Guest IP: 192.168.16.201

You may need to open up Windows Firewall on the host to that subnet to allow traffic in and out (you should be prompted when WF detects the new network for Public/Private Network sharing).
I understand about this being a local connection. The remark I just made may have been a bit unclear. Your comment about different subnets applied to the Internet connection on the guest (Ethernet adapter Local Area Connection) and the local share connection on the host (Ethernet adapter vEthernet (Local Share). These should be on different subnets, no?

The problem I'm having is that even though I assigned the Local Share switch to the guest, it doesn't show up as a connection when the guest is running. If it did, I could assign the IP address, with the correct subnet.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
It's Vista. Turns out I have to install some updates before I can check on Integration Services, so it will be a while.
With an up to date Integration Services your VM will see the Hyper-V native vNIC then you are good to go. No Legacy vNIC should be installed once IS is in.
It turned out the Vista install was broken--got into an infinite loop installing the service pack, IE browsing erratic. Instead of trying to fix it, I killed it and created a new Vista VM. Before doing anything else, I installed both service packs and installed Integration Services. Everything seems to be good now, local sharing works. Thanks.