Friday, May 31, 2013

Have you upgraded to vCenter 5.1 yet ???

VMware vCenter 5.1 upgrade or migrate?

Well after looking over all of the requirements and the massive changes in the design with the:
  • Inventory Service
  • Single Sign On
  • vCenter Service
  • Web Service
There was no way I really wanted to try an upgrade, but there was also no way that I wanted to start from scratch as I have 2 vCenters in different data centers with ~ 5,000 virtual machines...so now what?  

PowerCLI to the rescue

Well I knew there was much work to be done and I wasn't finding anyone on the net that was attempting it...not sure why.  The benefits of being able to stand up a new environment and getting it all working, especially with SSO, before even starting the migration was priceless.  I am not going to go into all of the details here, but I will be following up with other posts with all of the scripts that I had to write to make this a seemless, no downtime migration from vCenter 5.0 to vCenter 5.1.

Keep in mind that this migration was to new operating systems, new databases, new...everything.

Here are the overall steps that brought us to success:

1. Build a new clean setup of vCenter 5.1 on Windows 2008 R2
    • vCenter / Web services share an OS
    • DB server runs solo
    • SSO and SSO DB share an OS, this was for isolation and eventual replication needs, I really wanted SSO self contained
NOTE: Yes, we are using our Enterprise CA signed certificates, but this is not the post to go into that in depth...maybe later

2. Now it was time to document all of what needed to be brought from the old vCenter to the new, keeping in mind of course that we would be losing all historic stats and logs...not that they would be going away, but if we needed to get to them we would have to keep the old vCenter until we were alright with saying goodbye to all of our old data (not a big deal).  Here are the high level steps we took:

  • Manually create Access Roles to match your old environment
  • Export All VM details from source vCenter (namely folder location)
  • Make sure to bring over all license keys from old vCenter to new
  • Copy the vCenter ID to the new vCenter so our MAC addresses stay consistent
  • Manually created the Data Center object in the new vCenter with the same name as the old...could have been scripted, wasn't worth it
  • Run script to export all storage DRS clusters to a CSV file 
  • Run scipt to export all DRS cluster details to a CSV file
  • Run script to clone folder structure to the new vCenter, this included all folders in all categories: Network, VMs and Templates, Hosts and Clusters, Datastores
  • Run script to create all DVSwitches and portgroups in new vCenter, cloned from old vCenter
  • Run script create all cluster objects (DRS and SDRS) in new vCenter, making sure to leave HA and DRS off until all migrations have been completed
Now here is where it can get a bit crazy
  • Run script to:
    • Disconnect a host from source vCenter
    • Connect to new vCenter
    • Connect that new host to the new DVSwitch 
    • Remove one of the redundant uplinks from the now orphaned DVSwitch(s)
    • Connect it to the new DVSwitch(s)
    • Migrate all of the VM NICs to the portgroups on the NEW DVSwitches
    • Remove the remaining DVSwitch(s) uplinks from the orphaned DVSwitch(s) and add them as uplinks on the new DVSwitch(s)
    • ...loop through all hosts
  • Run script to import old DRS rules
  • Run script to import Datastores to SDRS clusters
  • Run script to move VMs to their proper VM folders
  • Run script to set permissions on all objects to mirror old vCenter
  • Manually re-created all custom alarms
That was about it.  We had some small issues due to some odd misconfigurations that we found, but we did all of this in up time and it was just plain AWESOME!!!

I will be following up with future posts with the scripts that I wrote and some other issues that we saw...like the new DVPortgroups now reject MAC address changes.


Thursday, May 30, 2013

Just getting started

Ok, so I was inspired today after a VMUG event to get blogging and share all of the things I am working on in hopes that it helps someone, but also as a place I can point to when I can't remember how I did something.

My focus will be primarily around server, network and storage virtualization.  I really enjoy automation through PowerCLI and using Powershell in general.  I have a heavy IT background since the early 90's, focusing primarily in the DOS and Windows at that time.  My interests have drifted from software to hardware, networking a little Database, but lately has been strongly into virtualization and Enterprise Architecture.

Looking to start technical posts as often as I can... probably weekly.