RSS .92| RSS 2.0| ATOM 0.3
  • Home
  •  

    PowerCLI – Gather Virtual Machine Network Information

    August 24th, 2010

    Mapping the virtual networking can be troublesome at times.  How often are you asked to provide MAC addresses to determine what switch port a Virtual Machine is using?  This quick PowerCLI script will walk through and display the VM name, Port Group(s), IP(s) and MAC Address.

    (get-vm) | %{
      $vm = $_
      echo $vm.name----
      $vm.Guest.Nics | %{
        $vminfo = $_
        echo $vminfo.NetworkName $vminfo.IPAddress $vminfo.MacAddress
    
      }
    }
    

    In this example, %{ } will conduct a foreach on each virtual machine from get-vm, and then a foreach on each virtual network adapter assigned to the VM.


    Network Oddity – MAC address aging

    July 16th, 2010

    We have been working through a pretty wild corner-case.

    Infrastructure

    ESX cluster that is made up of multiple blade chassis attached to Layer 2 switches.

    Odd Behavior

    The issue bubbles-up when virtual machines migrate from one chassis to another, and from switch to switch.  Pings to machines on the same Layer 2 network, but spread across the chassis and switch fails.  Layer 3 works just fine.

    The issue is not visible in all our use cases; some of the virtual machines are standalone while others do not need to communicate to Layer 2 peers.

    Resolution

    The cause of all of this appears to be a switch that will not properly age MAC addresses due to high CPU load on a separate line card in the switch chassis.  In short, when a VM migrates from chassis and switch to another chassis and switch, the MAC address does not get removed on the origin switch.  The origin switch still thinks it has the MAC and will never forward the packets to the peer switch.  However everyone on the destination chassis and switch is happy as a clam because they can all talk to each other.

    Conclusion

    There was no quick way to determine the root cause of this kind of issue since it looks like we suffered from a friendly-fire injury.  Network traces were analyzed, configurations reviewed.  I don’t think anyone thought of looking at stats on other modules in the switch chassis.