<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities: Message List - Reconfigure virtual switches to use IP-based load balancing.</title>
    <link>http://communities.vmware.com/community/vmtn/vsphere/automationtools/windows_toolkit?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Thu, 12 Feb 2009 00:12:15 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-02-12T00:12:15Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Reconfigure virtual switches to use IP-based load balancing.</title>
      <link>http://communities.vmware.com/message/1169399?tstart=0#1169399</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Someone asked today how to reconfigure all virtual switches to use IP-based load balancing. I decided to post the answer here, hope you find it useful.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;# This script will reconfigure all virtual switches with more than 1 NIC to use
# IP-based load balancing.
# NOTE: The script will reconfigure *ALL* virtual switches on *ALL* hosts.
# Change the Get-VMHost statement if that's not what you want.
Get-VMHost | Get-VMHostNetwork | foreach {
	$networkView = $_ | Get-View
	$switches = $networkView.NetworkInfo.Vswitch | Where { $_.Pnic.length -gt 1 }
	foreach ($switch in $switches) {
		$spec = $switch.spec
		$spec.policy.nicTeaming.policy = &amp;quot;loadbalance_ip&amp;quot;
		# Other values are loadbalance_srcmac, loadbalance_srcid (The default), failover_explicit
		$networkView.UpdateVirtualSwitch($switch.Name, $spec)
	}
}
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 11 Feb 2009 22:36:36 GMT</pubDate>
      <author>c_shanklin</author>
      <guid>http://communities.vmware.com/message/1169399?tstart=0#1169399</guid>
      <dc:date>2009-02-11T22:36:36Z</dc:date>
      <clearspace:dateToText>9 months, 2 weeks ago</clearspace:dateToText>
    </item>
  </channel>
</rss>

