Monday, July 3, 2017

vCenter Server 6.5 Upgrade: Issues and Lessons Learned


Just wanted to share some lessons learned from the upgrade/migration of one of our vCenter Servers.

In this scenario, we used the VMware Migration Assistant to go from a Windows Based vCenter 5.5 server using an external SQL DB to the vCSA 6.5.

**Make sure you read the Important Information KB, Upgrade Best Practices KB and the Release Notes (Links valid as of July 3rd 2017)**

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2147686

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2147548

https://docs.vmware.com/en/VMware-vSphere/6.5/rn/vsphere-vcenter-server-650d-release-notes.html

Here are the challenges I encountered during my upgrade in chronological order:
####
2017-04-11T20:56:15.429Z   Component Manager registration failed - {
    "resolution": null,
    "detail": [
        {
            "args": [
                "Service already registered in Component Manager; url:http://localhost:18090/cm/sdk/?hostid=afd6a1f9-6009-48f9-a4f3-ed068a88f873, id:xxxxxx-3899-4941-8E86-xxxxxx"
            ],
            "id": "com.vmware.cisreg.svc_already_registered",
            "localized": "The service is already registered:Service already registered in Component Manager; url:http://localhost:18090/cm/sdk/?hostid=afd6a1f9-6009-48f9-a4f3-ed068a88f873, id:xxxxxx-3899-4941-8E86-xxxxxx",
            "translatable": "The service is already registered:%(0)s"
        }
####
  • I was unable to upgrade, since it thought it was already at version 6.5.  This required the use of jxplorer to delete the offending service prior to retrying the upgrade.  Here's a link to resolve this issue: http://kenumemoto.blogspot.com/2017/05/vcenter-65-upgrade-problem-occurred.html
  • After another failed upgrade, we were able to start the vCenter Service (vpxd) after initializing the embedded vPostgres DB...  Essentially overwriting the entire contents of the DB…  the problem seems to be pointing to the source vCenter DB.  Given the complexity of our environment, starting from scratch was not an option. 
  • Ultimately, our vCenter 5.5 SQL vCenter DB was FTP'd to VMware so they were able to perform the upgrade and replicate the failure.  The escalation team was able to perform the upgrade in verbose mode to monitor each step of the upgrade.  They were able to successfully start the vpxd service after truncating the “vpx_field_val” table.   This contained all the Custom Attribute info.  When I saw the offending entries, they were employees who were no longer with the company.  These entries were pointing to VMs that no longer existed, and this was halting the upgrade... for some reason, these orphaned entries were not properly removed from VC DB.   No solid explanation was received, it could have been an un-graceful shutdown of the vCenter or sql server, iSCSI traffic issue, etc.
  • Our SQL DBA truncated the table named "vpx_field_val"
  • Prior to performing the upgrade the final time, I exported all the Custom Attributes to a .csv file.   After the successful upgrade, I used powershell and powercli to re-inject the info into vcenter.  (There was no way I was going to manually enter all those attributes for each of the 300+ VMs.)
  • To confirm the status of the upgrade few the following log: /var/log/firstboot/firstbootStatus.json
  • Add a Static DNS entry for your new vCSA.  Since the vCSA is running on a version of linux, we can no longer leverage Windows Dynamic DNS updates and the existing entry will eventually age out. 

How to View the Group Policy Settings Applied to a Computer

I had an Admin ask me this question recently, so I figured I share the info.

As your Domain grows and your Group Policies become more complex, it becomes difficult to keep track of which group policies are applied to a specific computer.  

To quickly find out the GPs applied to a computer, use the GpResult command.  The command displays the Resultant Set of Policy (RSoP) information for a user and computer.  

https://technet.microsoft.com/en-us/library/cc733160%28v=ws.11%29.aspx?f=255&MSPPError=-2147217396

The following example dumps a verbose output of the gpresult for the user and computer into a file called gpresult.txt 

gpresult  /v > D:\gpresult.txt.

You can then search the file for a specific policy.

To view a GUI version,  run rsop.msc


Tuesday, June 20, 2017

vSphere Web Client - Unmount Datastore Grayed out.

It was time to decommission one of our iSCSI datastores.  I ensured the following:
  • All VMs, snapshots and templates have been migrated off.
  • Datastore is not used for HA heartbeat
  • Not part of a datastore cluster.
  • Not configured as a coredump partition
  • Storage I/O Control disabled 
**Go through the complete unmounting a LUN checklist prior to unmounting a LUN: 


When I tried to unmount the datastore, using the vSphere Web Client, the option was grayed out...


Workaround: 
After going through the detailed checklist in VMware KB 2004605  I went OLD SCHOOL and used the VMware vSphere Client to log directly into the host using the Datastore.  Through the vSphere Client, I was able to successfully unmount the datastore.

FYI - You can still point your vSphere Client directly to an ESXi 6.5 host.


Jan 23rd 2018 Update:
It happened again, this time I used the web client pointed directly at the ESXi host to perform the unmount function:


Friday, June 16, 2017

VMWare vCenter Converter 6.1.1 works with vSphere 6.5

** Confirmed - I have successfully P2V'd a production SQL server managed by a vCenter 6.5 server. No Biggie**

I recently received a request to P2V an old Windows Server 2008 R2 server.  I'll be honest, the last time I used Converter was with version 5.X.

I go to VMware.com and the latest version of VMware Converter is 6.1.1.  This version was released back in February of 2016. This predates the release of vSphere 6.5.

Sure enough, in the VMware Converter document, it states that it only supports up to vCenter Server 6.0.  I'm running vSphere 6.5, time to test...

** Perform the VM conversion at your own risk. This is not a VMware supported configuration **

Fortunately, this version is very similar to previous versions I've used.  I installed the Converter application on the source VM and "let er run".  Nothing fancy, the default options were taken

Well, I lucked out and was able to successfully perform the migration.  Good Luck!

Thursday, June 8, 2017

vCSA 6.5: How to Find Which PSC your vCSA is pointing to, its SSO Domain Name and SSO Site Name

I was recently asked for some SSO and PSC config info for a vCSA running version 6.5.  Just SSH into your vCSA and run the following one-liners:

To find your SSO Domain Name:
/usr/lib/vmware-vmafd/bin/vmafd-cli get-domain-name --server-name localhost

To find your SSO Site Name:
/usr/lib/vmware-vmafd/bin/vmafd-cli get-site-name --server-name localhost

To find you which PSC your vCSA is pointing to:
/usr/lib/vmware-vmafd/bin/vmafd-cli get-ls-location --server-name localhost


Wednesday, May 24, 2017

How to log all PuTTY sessions

Here's a quick tip on how to set up logging in PuTTY.  It's great for reviewing the changes made and for documentation purposes. 

1. Launch PuTTY and go to Logging.  I personally select All Session Output and also like to specify the Host, Month, Date, Year and Time of each log.  It makes the management of the logs easier.

ex.   E:\PuTTYLogs\&H_&M&D&Y_&T.log



2.  Now go up to Session, select Default Settings and click Save.

3. Test - SSH into a host and confirm a log files has been automatically created.



vCenter 6.5 upgrade: A problem occurred while - Starting VMware vCenter Server...

After an initial failed attempt at migrating a Windows based vCenter 5.5 to vCSA 6.5, I received the following error during the subsequent retry:

A problem occurred while - Starting VMware vCenter Server


The \var\log\firstboot\vpxd_firstboot.ph_xxxxx_stdout.log within the vm-support bundle revealed that a service was already registered in component manager.  

This was  due to a previously failed upgrade attempt:


Make note of the id number in red in the example above.  Launch JXplorer and connect to your PSC.  Details regarding JXplorer can be found here:

http://kenumemoto.blogspot.com/search?q=Jxplorer

Drill down to the following location.  Select the offending service and view the details.  As you can see,  it's incorrectly showing as Version 6.5.


Right-Click on the offending service, then click Delete.   Now restart the upgrade\migration process.