Showing posts from May, 2015

Migrating VMs to a Standard Switch

One of my customers has asked me to help them migrate from one vCenter server to another.  In order to do this without causing interruptions, we're using ESXi servers like boats to bring the VMs from the old environment into the new one; basically the same process that I used last time a customer asked me to do this.

This time, we're completing this process at many different sites and each site has many VMs that need to traverse the vCenter servers.  Since this customer doesn't yet have vSphere 6 with its inter-vCenter vMotion capability, we're left doing it the hard way.  That means doing an arduous, detail oriented, highly repetitive task... or, writing a script to do it for me.
The worst part of this process comes from the VM networking.  We have to create Standard vSwitches on each ESXi host with VLAN configurations that mirror the Distributed vSwitch that belongs in the vCenter, then move all of the VMs to the appropriate Port Groups on the newly created standard …

Enabling Network IO Control (NIOC) through PowerCLI

Here's a short one.  One of my customers is using the VMware Distributed vSwitch in multiple vCenter inventories.  Since each vCenter maintains its own instance of the vSwitch, I was tasked with putting together an easy and repeatable process to create identically configured vSwitches across all of these environments.  In other words, I was asked for a script!  Most of the process is very well documented online, but there was one aspect of the config that was a struggle: enabling NIOC via PowerCLI.  It's a simple checkbox in the GUI, but near as I can tell, there was no simple way to enable it in a PowerShell script.

Like so often in life, LucD has the answer.  This specific nugget of information is a bit buried, so I figured that I'd put together a quick note expanding on it.  There's an API method, EnableNetworkResourceManagement(), that can toggle that setting for the DVS, but that method doesn't exist under the normal PowerCLI DVS object.  So, how do you access…