none
Can't ping Hyper-V VM from host RRS feed

  • Question

  • Hi,

    I have a Hyper-V VM. This is set to a VLAN of 2 and given a valid network connection. Likewise with the Hyper-V Virtual Network Manager, there is a VLAN of 2, valid connection, etc.

    However, I can't ping the Hyper-V VM from the Hyper-V server (they're in the same domain etc). The result of the ping is always "Destination host unreachable". The VM has a valid IP and DNS entry. I also can't ping from my physical workstation but this is on another domain (does that matter?).

     

    Thanks

    Tuesday, December 7, 2010 9:27 PM

Answers

  • Hi,

    I tried some of the things in this thread. No luck. E.g. I couldn't ping anything. All settings were fine e.g. subnet, IP, DNS provider, etc.

    However, I gave the VM a fresh/new IP from the pool (a static IP) and everything worked. No idea why.

    Sunday, December 12, 2010 12:13 AM

All replies

  • Hi

    The domain where the VM's and Physical Hosts are does not matter for ping.


    Ensure that your physical NICs support VLAN tagging and that this feature is enabled. You should set the VLAN ID on either the Virtual Switch or the individual Virtual Machine’s configuration, not at the physical NIC. The VLAN ID on the Virtual Switch is the one used by the managment operating system (also sometimes called Host or Parent Partition). The VLAN ID setting on the individual Virtual Machine’s settings is what each VM will use.

    NOTE: You can assign only one VLAN ID on the Virtual Switch. The V-Switch (parent partition) can operate on one VLAN, and the VMs (child partitions) can operate on different VLANs

    Also, check the IP configuration : IP address, MASK and GATEWAY.

    If the physical workstation are physically connected to the same internal network ( e.g. sharing the switch ) as the Hyper-V host, you should be able to ping the Hyper-V Host.

    To ping the VM, from the workstation, you need to creater the Virtual Network as External and the Mask/Gateway, should match

    Please check these articles:

    Hyper-V: Configuring VLANs and VLAN tagging
    http://social.technet.microsoft.com/wiki/contents/articles/hyper-v-configuring-vlans-and-vlan-tagging.aspx

    http://social.technet.microsoft.com/wiki/contents/articles/hyper-v-virtual-networking-best-practices.aspx


    If this post is helpful, please mark it as such
    ________________________________________
    Alessandro Cardoso
    MVP | Microsoft Heroes | MCT
    blog: http://virtualisationandmanagement.wordpress.com
    http://virtualizacaoegerenciamento.wordpress.com
    Wednesday, December 8, 2010 12:24 AM
  • Hi,

     

    Please perform the following suggestions:

     

    1. Can you ping the other physical computers in the same VLAN from both the Hyper-V host computer and then VM?

    2. Can you ping the Hyper-V host machine and VMs from other physical computers in the same VLAN?

    3. How about to remove the VLAN ID from both the Hyper-V host machine and the VM? Can you ping them from each other?

     

    By the way, please provide the network topology of your LAN.

     

     

    Best Regards,

    Vincent Hu

     

    Wednesday, December 8, 2010 8:23 AM
    Moderator
  • ·         Hi,

     

    Have you tried the suggestion? I want to see if the information provided was helpful. Your feedback is very useful for the further research. Please feel free to let me know if you have addition questions.

     

     

    Best regards,

    Vincent Hu

    Friday, December 10, 2010 1:51 AM
    Moderator
  • Hi,

    I tried some of the things in this thread. No luck. E.g. I couldn't ping anything. All settings were fine e.g. subnet, IP, DNS provider, etc.

    However, I gave the VM a fresh/new IP from the pool (a static IP) and everything worked. No idea why.

    Sunday, December 12, 2010 12:13 AM
  • Thanks It worked
    Friday, January 22, 2016 7:00 AM
  • I ran into this same issue today on a Windows 10 v1709 machine with Hyper-V - the guests could ping each other, and the guests could ping the host, but the host could not ping the guests.

    The reason was that the network connection on the host that the VMs were connected to had a profile of "public". You can verify this by running the PowerShell cmd:

         Get-NetConnectionProfile

    If you are seeing the same, change the profile by running the command:

         Set-NetConnectionProfile -InterfaceAlias "vEthernet (Default Switch)" -NetworkCategory Private

    Replace "vEthernet (Default Switch)" with the value of the InterfaceAlias property of the connection you want to modify.

    Monday, January 22, 2018 7:48 PM
  • I am getting a permission denied error when trying to run the Set-NetConnectionProfile command.  I tried logging into the VM as both a local and domain admin.  When I ran the Get-NetConnectionProfile command, the connection was set to DomainAuthenticated, and I was trying to set it to Private.  I have another VM setup exactly the same way and the connection is set to Private and I can ping it from the host, but I am not able to ping the other VM.  Any suggestions?


    PS C:\Users\sccmadmin> Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private
    Set-NetConnectionProfile : Unable to set the NetworkCategory due to one of the following possible reasons: not running
    PowerShell elevated; the NetworkCategory cannot be changed from 'DomainAuthenticated'; user initiated changes to
    NetworkCategory are being prevented due to the Group Policy setting 'Network List Manager Policies'.
    At line:1 char:1
    + Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : PermissionDenied: (MSFT_NetConnect...4EC846592A51}"):root/StandardCi...nnectionProfile)
       [Set-NetConnectionProfile], CimException
        + FullyQualifiedErrorId : MI RESULT 2,Set-NetConnectionProfile

    • Edited by LanceTech Wednesday, February 14, 2018 8:16 PM
    Wednesday, February 14, 2018 8:14 PM
  • It appears you are not running an elevated PowerShell console.

    Run the following command to verify:

    If (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
        {Write-Warning "Standard user security token!"} Else
        {Write-Host "Administrator security token!"}

    Wednesday, February 14, 2018 8:35 PM
  • Also one should make sure the "Network List Manager Policies" in Group Policy is properly set to allow the user to change the location of the unknown network.
    Sunday, December 30, 2018 11:10 AM