vSphere 5 Top 10 – vMotion

Another post coming from our Dutch VMUG Event 2011 presentation. On position number 10, we find the vMotion Enhancements that were introduced with vSphere 5.

A single vMotion can now scale over multiple NICs. This feature can use a regular vSwitch or distributed vSwitch.On YouTube there are 2 videos, uploaded by VMwareKB, that show how to configure such a vMotion enabled multi-NIC vSwitch, regular and distributed.

Very useful videos, but as you can imagine, I wanted to automate this. No GUI clicking for me  😉

The script


Line 42-44: A simple Object By Name (OBN) implementation for the ESXi host

Line 45-48: A check if we are configuring this for at least a vSphere 5 server

Line 50-52: A simple Object By Name (OBN) implementation for the regular vSwitch

Line 53: When the function is called with ‘n’ vnics, it will have to create ‘n’ portgroups. This calculation creates the list of suffixes that will be used on the portgroup names.

Line 55: The creation of the portgroup. Note how the function adds a 2 digit suffix with the -format operator to the basename (‘vMotion’)

Line 56: Set the IP address and subnetmask

Line 57-58: The Teaming is configured in the same way the VMwareKB video demonstrates.

Sample use

To demonstrate the function, I will use a simple configuration. We have 1 regular vSwitch that has 3 vnics connected to it.

We call the function

The function creates the vMotion portgroups (in the same way as the VMwareKB video shows).

And each of these vMotion enabled portgroups is configured similar to the method shown in the video.

In a following post I will show how this can be done for a dvSwitch.

Enjoy !

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.