build 7bbbddf7 | content blog-content@c8490fa · 338 posts | profiles 20 · corpus 267 | 0 skipped | | format
apiVersion: soultec.ch/v1kind: Postmetadata: name: esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc locale: en labels: author: dario-doerflinger series: event annotations: source: blog-content/posts/en/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md route: /en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/ schema: /nerd/schema/posts.json markdown: /en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.mdspec: title: New Ways to set vMotion, fault Tolerance Logging, etc. date: 2016-06-16 author: dario-doerflinger locale: en summary: >- Hello guys! I'm back on my blog after changing my job and generally having been very busy over the last two years. series: event legacySlug: esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc migrated: 2026-08-24 draft: false sections: - body: | Hello guys! ![scripting-platforms](/blog-assets/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/01.webp) I'm back on my blog after changing my job and generally having been very busy over the last two years. Today I want to tell you guys about change in esxcli (which happened sometime in the last two years) which allows you to set vMotion, Management and for example fault tolerance Logging on a vmkernel interface in VMware ESXi. In the past you had to do this with vim-cmd for fault tolerance and vmotion and had to use some other tricks to get this working with the mangement traffic. Now however this is a simple esxcli command. Here are the functions for vmotion that I've (re-)written for my esxi staging appliance. > \# Configuring vMotion > SetVMotion() > { > \# Function variables, if not defined uses standard values > portGroupName=$1 > if \[ ! -z $2 \]; then mtu=$2; else mtu=1500; fi > vmkIPs=$myVMIP1,$myVMIP2 > \# For every port group with that name, a vmk will be generated and configured for VMotion > i=1 > for portGroup in \`esxcli --formatter=csv network vswitch standard portgroup list | grep -i $portGroupName | awk -F "," '{print $2}'\`; do > esxcli network ip interface add -p $portGroup -m $mtu > case $esxVersion in > "6.0.0"|"5.5.0") > vmk=\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F "," '{print $5}'\` > ;; > "5.0.0"|"4.1.0") > vmk=\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F "," '{print $4}'\` > ;; > \*);; > esac > vmkIP=\`echo $vmkIPs | awk -F "," '{print $'$i'}'\` > esxcli network ip interface ipv4 set -i $vmk -I $vmkIP -N $myVMMask -t static > **esxcli network ip interface tag add -i $vmk -t VMotion** > i=$(( $i + 1 )) > done > } The command in bold can be found in the latest documentation: [Here](http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vcli.ref.doc/esxcli_network.html)status: corpus: 267
{ "apiVersion": "soultec.ch/v1", "kind": "Post", "metadata": { "name": "esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc", "locale": "en", "labels": { "author": "dario-doerflinger", "series": "event" }, "annotations": { "source": "blog-content/posts/en/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md", "route": "/en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/", "schema": "/nerd/schema/posts.json", "markdown": "/en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md" } }, "spec": { "title": "New Ways to set vMotion, fault Tolerance Logging, etc.", "date": "2016-06-16", "author": "dario-doerflinger", "locale": "en", "summary": "Hello guys! I'm back on my blog after changing my job and generally having been very busy over the last two years.", "series": "event", "legacySlug": "esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc", "migrated": "2026-08-24", "draft": false }, "sections": [ { "body": "Hello guys!\n\n![scripting-platforms](/blog-assets/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/01.webp)\n\nI'm back on my blog after changing my job and generally having been very busy over the last two years.\n\nToday I want to tell you guys about change in esxcli (which happened sometime in the last two years) which allows you to set vMotion, Management and for example fault tolerance Logging on a vmkernel interface in VMware ESXi.\n\nIn the past you had to do this with vim-cmd for fault tolerance and vmotion and had to use some other tricks to get this working with the mangement traffic.\n\nNow however this is a simple esxcli command.\n\nHere are the functions for vmotion that I've (re-)written for my esxi staging appliance.\n\n> \\# Configuring vMotion \n> SetVMotion() \n> { \n> \\# Function variables, if not defined uses standard values \n> portGroupName=$1 \n> if \\[ ! -z $2 \\]; then mtu=$2; else mtu=1500; fi \n> vmkIPs=$myVMIP1,$myVMIP2 \n> \\# For every port group with that name, a vmk will be generated and configured for VMotion \n> i=1 \n> for portGroup in \\`esxcli --formatter=csv network vswitch standard portgroup list | grep -i $portGroupName | awk -F \",\" '{print $2}'\\`; do \n> esxcli network ip interface add -p $portGroup -m $mtu \n> case $esxVersion in \n> \"6.0.0\"|\"5.5.0\") \n> vmk=\\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F \",\" '{print $5}'\\` \n> ;; \n> \"5.0.0\"|\"4.1.0\") \n> vmk=\\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F \",\" '{print $4}'\\` \n> ;; \n> \\*);; \n> esac \n> vmkIP=\\`echo $vmkIPs | awk -F \",\" '{print $'$i'}'\\` \n> esxcli network ip interface ipv4 set -i $vmk -I $vmkIP -N $myVMMask -t static \n> **esxcli network ip interface tag add -i $vmk -t VMotion** \n> i=$(( $i + 1 )) \n> done \n> }\n\nThe command in bold can be found in the latest documentation:\n\n[Here](http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vcli.ref.doc/esxcli_network.html)" } ], "status": { "corpus": 267 }}
apiVersion = "soultec.ch/v1"kind = "Post"[metadata]name = "esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc"locale = "en"[metadata.labels]author = "dario-doerflinger"series = "event"[metadata.annotations]source = "blog-content/posts/en/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md"route = "/en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/"schema = "/nerd/schema/posts.json"markdown = "/en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md"[spec]title = "New Ways to set vMotion, fault Tolerance Logging, etc."date = 2016-06-16author = "dario-doerflinger"locale = "en"summary = "Hello guys! I'm back on my blog after changing my job and generally having been very busy over the last two years."series = "event"legacySlug = "esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc"migrated = 2026-08-24draft = false[[sections]]body = '''Hello guys!![scripting-platforms](/blog-assets/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/01.webp)I'm back on my blog after changing my job and generally having been very busy over the last two years.Today I want to tell you guys about change in esxcli (which happened sometime in the last two years) which allows you to set vMotion, Management and for example fault tolerance Logging on a vmkernel interface in VMware ESXi.In the past you had to do this with vim-cmd for fault tolerance and vmotion and had to use some other tricks to get this working with the mangement traffic.Now however this is a simple esxcli command.Here are the functions for vmotion that I've (re-)written for my esxi staging appliance.> \# Configuring vMotion > SetVMotion() > { > \# Function variables, if not defined uses standard values > portGroupName=$1 > if \[ ! -z $2 \]; then mtu=$2; else mtu=1500; fi > vmkIPs=$myVMIP1,$myVMIP2 > \# For every port group with that name, a vmk will be generated and configured for VMotion > i=1 > for portGroup in \`esxcli --formatter=csv network vswitch standard portgroup list | grep -i $portGroupName | awk -F "," '{print $2}'\`; do > esxcli network ip interface add -p $portGroup -m $mtu > case $esxVersion in > "6.0.0"|"5.5.0") > vmk=\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F "," '{print $5}'\` > ;; > "5.0.0"|"4.1.0") > vmk=\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F "," '{print $4}'\` > ;; > \*);; > esac > vmkIP=\`echo $vmkIPs | awk -F "," '{print $'$i'}'\` > esxcli network ip interface ipv4 set -i $vmk -I $vmkIP -N $myVMMask -t static > **esxcli network ip interface tag add -i $vmk -t VMotion** > i=$(( $i + 1 )) > done > }The command in bold can be found in the latest documentation:[Here](http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vcli.ref.doc/esxcli_network.html)'''[status]corpus = 267
<?xml version="1.0" encoding="UTF-8"?><manifest kind="Post"> <apiVersion>soultec.ch/v1</apiVersion> <metadata> <name>esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc</name> <locale>en</locale> <labels> <author>dario-doerflinger</author> <series>event</series> </labels> <annotations> <source>blog-content/posts/en/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md</source> <route>/en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/</route> <schema>/nerd/schema/posts.json</schema> <markdown>/en/insights/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc.md</markdown> </annotations> </metadata> <spec> <title>New Ways to set vMotion, fault Tolerance Logging, etc.</title> <date>2016-06-16</date> <author>dario-doerflinger</author> <locale>en</locale> <summary>Hello guys! I'm back on my blog after changing my job and generally having been very busy over the last two years.</summary> <series>event</series> <legacySlug>esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc</legacySlug> <migrated>2026-08-24</migrated> <draft>false</draft> </spec> <sections> <section> <body>Hello guys!![scripting-platforms](/blog-assets/esxi-kickstart-new-ways-to-set-vmotion-fault-tolerance-logging-etc/01.webp)I'm back on my blog after changing my job and generally having been very busy over the last two years.Today I want to tell you guys about change in esxcli (which happened sometime in the last two years) which allows you to set vMotion, Management and for example fault tolerance Logging on a vmkernel interface in VMware ESXi.In the past you had to do this with vim-cmd for fault tolerance and vmotion and had to use some other tricks to get this working with the mangement traffic.Now however this is a simple esxcli command.Here are the functions for vmotion that I've (re-)written for my esxi staging appliance.&gt; \# Configuring vMotion &gt; SetVMotion() &gt; { &gt; \# Function variables, if not defined uses standard values &gt; portGroupName=$1 &gt; if \[ ! -z $2 \]; then mtu=$2; else mtu=1500; fi &gt; vmkIPs=$myVMIP1,$myVMIP2 &gt; \# For every port group with that name, a vmk will be generated and configured for VMotion &gt; i=1 &gt; for portGroup in \`esxcli --formatter=csv network vswitch standard portgroup list | grep -i $portGroupName | awk -F "," '{print $2}'\`; do &gt; esxcli network ip interface add -p $portGroup -m $mtu &gt; case $esxVersion in &gt; "6.0.0"|"5.5.0") &gt; vmk=\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F "," '{print $5}'\` &gt; ;; &gt; "5.0.0"|"4.1.0") &gt; vmk=\`esxcli --formatter=csv network ip interface list | grep -i $portGroup | awk -F "," '{print $4}'\` &gt; ;; &gt; \*);; &gt; esac &gt; vmkIP=\`echo $vmkIPs | awk -F "," '{print $'$i'}'\` &gt; esxcli network ip interface ipv4 set -i $vmk -I $vmkIP -N $myVMMask -t static &gt; **esxcli network ip interface tag add -i $vmk -t VMotion** &gt; i=$(( $i + 1 )) &gt; done &gt; }The command in bold can be found in the latest documentation:[Here](http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vcli.ref.doc/esxcli_network.html) </body> </section> </sections> <status> <corpus>267</corpus> </status></manifest>
Event · 2016-06-16

New Ways to set vMotion, fault Tolerance Logging, etc.

Hello guys! I'm back on my blog after changing my job and generally having been very busy over the last two years.

2016-06-16Date
Dario DörflingerAuthor
2Min read
Topics

This post is from 2016. It stays online because people still look for it, but it describes the products as they were then.

Hello guys!

scripting-platforms

I’m back on my blog after changing my job and generally having been very busy over the last two years.

Today I want to tell you guys about change in esxcli (which happened sometime in the last two years) which allows you to set vMotion, Management and for example fault tolerance Logging on a vmkernel interface in VMware ESXi.

In the past you had to do this with vim-cmd for fault tolerance and vmotion and had to use some other tricks to get this working with the mangement traffic.

Now however this is a simple esxcli command.

Here are the functions for vmotion that I’ve (re-)written for my esxi staging appliance.

# Configuring vMotion
SetVMotion()
{
# Function variables, if not defined uses standard values
portGroupName=$1
if [ ! -z $2 ]; then mtu=$2; else mtu=1500; fi
vmkIPs=$myVMIP1,$myVMIP2
# For every port group with that name, a vmk will be generated and configured for VMotion
i=1
for portGroup in `esxcli —formatter=csv network vswitch standard portgroup list | grep -i $portGroupName | awk -F ”,” ‘{print $2}’`; do
esxcli network ip interface add -p $portGroup -m $mtu
case $esxVersion in
”6.0.0”|“5.5.0”)
vmk=`esxcli —formatter=csv network ip interface list | grep -i $portGroup | awk -F ”,” ‘{print $5}’`
;;
“5.0.0”|“4.1.0”)
vmk=`esxcli —formatter=csv network ip interface list | grep -i $portGroup | awk -F ”,” ‘{print $4}’`
;;
*);;
esac
vmkIP=`echo $vmkIPs | awk -F ”,” ‘{print $‘$i’}‘`
esxcli network ip interface ipv4 set -i $vmk -I $vmkIP -N $myVMMask -t static
esxcli network ip interface tag add -i $vmk -t VMotion
i=$(( $i + 1 ))
done
}

The command in bold can be found in the latest documentation:

Here

You might also like

Too few qualifying matches. The block stays empty rather than showing one lonely card.