Can't ping a local VM from the host [closed]
Asked Answered
E

8

21

My work laptop is is a member of a domain (the OS is Windows 8). Created a new VM, locally on this laptop (using built-in Hyper-V). DHCP is provided by the domain and all IP addresses are assigned by the DHCP, both to the host and to the VM. The VM is not a member of the domain, just a member of the WORKGROUP. Trying to ping a local VM from the host. Pinging by machine name does not work. Pinging by IP address works just fine. Both host OS and the VM are on the same sub-network.

The IP addresses change every time I reconnect the laptop to office network. I would like to avoid the pain of using different IP's all the time.

Is there anything I can do on my end to make names resolution work? Adding the VM to the domain is not an option.

Effervesce answered 16/8, 2013 at 16:51 Comment(1)
I am not a networking guru, but it is possible that your DNS server only allows valid domain members to update the name records. This would prevent your VM from telling other machines its name. This is one of the settings options from Checklist: Secure Your DNS Server: Allow only secure dynamic updates for all DNS zones. This ensures that only authenticated users can submit DNS updates using a secure method, which helps prevent the IP addresses of trusted hosts from being hijacked by an attacker.Kulun
F
45

I know this is an old post, but I ran into this same issue with my VMs. Log into the VM and go to Control Panel > System and Security > Windows Firewall > Allowed Apps. Then check all of the boxes next to "File and Printer Sharing" to enable file sharing. This should allow you to ping the VM. The screenshot below is from a 2016 Windows Server but the same method will work on older ones.

enter image description here

Fissiparous answered 22/5, 2018 at 19:42 Comment(3)
Worked for me also on Win10Pro running on VirtualBox6.1.4 and bridged to my physical Ethernet adapter.Philately
I had done the above and also changed to a bridged adapter but was still having no luck. It turned out my work vpn was interfering for some reason... worth killing it if you're in the same boatAshtray
Thanks @Ashtray , that helped me. Turning the VPN off, or switching to "split tunnel" mode" allowed my pings to work.Hotze
E
38

The issue could be that the VM is connected to the network via NAT. You need to set the network adapter of the VM to a bridged connection so that the VM will get it's own IP within the actual network and not on the LAN on the host.

Estas answered 2/10, 2013 at 19:41 Comment(2)
In case someone can't figure it out, VM settings -> Network -> Attached to [change to Bridge Adapter from the drop down]Vinegarette
In case it is still not working after then go to VM settings -> Network -> Attached to and choose Bridgie adaptor from the the drop down. then click on advanced to open advanced section and click on Promiscuous Mode and the choose Allow All from the drop Down Menu.Maggiemaggio
R
8

I had a similar issue. You won't be able to ping the VM's from external devices if using NAT setting from within VMware's networking options. I switched to bridged connection so that the guest virtual machine will get it's own IP address and and then I added a second adapter set to NAT for the guest to get to the Internet.

Reciprocity answered 2/11, 2013 at 0:23 Comment(1)
OP is asking about Hyper-V network, not VMware. Configurations are bit different.Planchette
M
2

try to drop the firewall on your laptop and see if there is difference. Maybe Your laptop is firewall blocking some broadcasts that prevents local network name resolution.

Moustache answered 16/8, 2013 at 17:25 Comment(2)
Tried that. Did not help.Effervesce
I could ping the host from the VM in bridged mode, could not ping the VM from the host. Turning off the firewall on the VM fixed it for me.Grabowski
D
1

On top of using a bridged connection, I had to turn on Find Devices and Content on the VM's Windows Server 2012 control panel network settings. Hope this helps somebody as none the other answers worked to ping the VM machine.

Dalpe answered 2/7, 2020 at 12:24 Comment(0)
C
0

Try dropping all the firewall, the one from your VM and the one from you Laptop, or add the rule in your firewall where you can ping

Cluny answered 4/6, 2015 at 14:16 Comment(0)
S
0

Maybe your VMnet8 ip is not in the same network segment, e.g., my vm ip is 192.168.71.105, I can ping my windows in vm, but can't ping vm in windows, so this time you may check if vmnet8 is configured right. IP: 192.168.71.1

Stabilize answered 1/1, 2016 at 2:55 Comment(1)
OP is asking about Hyper-V network, not VMware. Configurations are bit different.Planchette
D
0

I had the same issue. Fixed it by adding a static route on my host to my VM via the VMnet8 adapter:

route ADD VM_addr MASK 255.255.255.255 VMnet8_addr

As previously mentioned, you need a bridged connection.

Distracted answered 12/10, 2019 at 9:36 Comment(1)
OP is asking about Hyper-V network, not VMware. Configurations are bit different.Planchette

© 2022 - 2024 — McMap. All rights reserved.