20

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.

user2690101
  • 241
  • 1
  • 2
  • 5
  • 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](http://technet.microsoft.com/en-us/library/cc770432.aspx): *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.* – chue x Aug 16 '13 at 16:59

8 Answers8

43

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

Marilee Turscak - MSFT
  • 7,367
  • 3
  • 18
  • 28
  • Worked for me also on Win10Pro running on VirtualBox6.1.4 and bridged to my physical Ethernet adapter. – Or Hirshfeld Apr 13 '20 at 09:29
  • 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 boat – JonnyRaa Feb 28 '22 at 18:05
  • 1
    Thanks @JonnyRaa , that helped me. Turning the VPN off, or switching to "split tunnel" mode" allowed my pings to work. – aampere Apr 28 '22 at 18:27
36

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.

ExceptionLimeCat
  • 6,191
  • 6
  • 44
  • 77
  • 6
    In case someone can't figure it out, VM settings -> Network -> Attached to [change to Bridge Adapter from the drop down] – Teshan Shanuka J Sep 20 '19 at 04:27
  • 1
    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. – karim samir Jan 11 '22 at 18:01
7

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.

sanvj
  • 137
  • 4
  • 14
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.

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.

Officeboy
  • 11
  • 1
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

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

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.