Script

Bulk create vSwitch networks

I blogged a bit about this in the Consolidating datacenters post. As part of moving a customers VM’s in to our datacenter, the network and storage was streched and host deployed in our datacenter was presented to the customeres vCenter, so that it was a simple (s)vMotion, that was all that was needed to move the VM’s from customer site to our datacenter. Simple, fast and effective.

All this was only possible because the customer still used the standard vSwitch – As our datacenter uses the┬ádistributed virtual switch, I created this script in order to stadalize how network was created on each host presented to the customer vCenter – This insures that the hosts are configured correctly and saves me a lot of clicks with the mouse. The script currently doesn’t set which vmkernel port is used for vMotion, the reason for that is that, I had the need for multiple vMotion port for the different parts of the customer site, so is was much easier, to just change that manually. If you only need one vMotion/vmkernel port you append the following to the “Set-VirtualPortGroup” line in the vmkernel port section of the script.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *