Saturday, February 4, 2012

Automated ESX Virtual Machine VLAN test

At work we moved away from standalone servers to HP blade servers with two 10Gbe pass-thru configuration. I recently built 5 ESXi4.1 hosts in to our growing number of ESXi clusters. Before putting the server in to production, we let it bake in the sun for about one to two weeks. After baking is over, we test VLAN and fault tolerance on NICs. After countless clicks to Vmotion a VM_HLPER VM through ESXi hosts, I decided to make script for it. Below is the script for my automated VLAN test using VM_HELPER machine. VM_HELPER is a small VM that helps administrators run tests like this. VM_HELPER should have access to all VM VLANs with IP address.
Be sure that ESX servers are not being used in production. The script will isolate each vmnic from vSwitch0.

4 comments:

  1. Hi thanks for this helpful script, i have tested it, but can't figure out what the purpose is of line 36 "$pingfile = "c:\scripts\"+ $vmnic.networkname + ".cmd""

    Should i just point to the location of cmd.exe?

    ReplyDelete
    Replies
    1. Has this blog been abandoned? Could really use an answer to this question.

      Delete
    2. Hi. Sorry for the late reply. line 36 is used to that it would create temporary ping script to ping VLANs. Depending on number of VLANs you have, it will open up CMD windows and start pinging other VM's VLANs. I hope this answered your question.

      Delete
  2. Hi

    Nice script. For your information I just created script which can be used to test freshly added VLAN from production hosts too.
    http://olli.problem.fi/2014/12/automatic-vmware-vlan-connectivity.html

    ReplyDelete