Saturday, March 17, 2018

vSphere 6 - Fix - Cannot complete operation due to concurrent modification by another operation.

Add more resources to a VM, not a problem right?  Well, not this time.  When attempting to add memory to a VM, I received the following error:

"Cannot complete operation due to concurrent modification by another operation."



I confirmed there were no other operations/modifications occurring on the VM at the same time.  In the past, I would just SSH/Console into the vCSA and restart the services with the following commands.  (Warning - This process is disruptive):

service-control --stop –all
service-control –start –all

In this case, the services restart did not resolve the issue.  On a whim, I created and deleted a snapshot on the VM.  This action "freed" up the VM and allowed me to add the additional resources.


In the future, I'm going start off with the "snapshot" route since it's less disruptive.

Hope this helps!

Friday, March 16, 2018

"RDP Inception"

That's when you have to RDP into one box to get to another box.  That is all...

Saturday, September 16, 2017

vSphere 6.5 - I/O error accessing change tracking file

Recently, I had to migrate a set of VMs from one vCenter server to another.   I was able to successfully migrate the dev and staging VMs without a problem.  This process took 15 minutes TOPS including reboots.

Of course, when I went to power up the production VMs, I received the following error through the Web Client:

I/O error accessing change tracking file


This error was a bit deceiving, a quick look at the error showed a familiar error:

Cannot open the disk '/vmfs/volumes/ or one of the snapshot disks it depends on.



This error message pointed me directly to the vmdk with the error and I was able to perform the steps in the following KB to resolve this issue.

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

Wednesday, September 6, 2017

vSphere 6.5 - Platform Services Controller (PSC) – Recommended Topology, Restore and Design Considerations


I recently had to work with VMware on a PSC issue and thought I'd share the information collected.

***Update 09.07.17*** - For those of you who are performing new install or upgrading to vSphere 6.5, VMWare recently released a vSphere 6.5 Topology and Upgrade Planning Tool. It can be found here:

https://vspherecentral.vmware.com/path-finder

General Info:
  1. What’s being replicated:
    1. SSO
    2. Tags
    3. Custom Roles
    4. Global Permissions
    5. Licensing.
  2. Below is a link to supported and deprecated topologies for vSphere 6.5.
  3. PSCs are in a Multi-master Model.  
  4. A replication agreement (Bidirectional) is created at the time the PSC is built/installed.  All additional replication agreements must be created manually. (Vdcrepadmin)
  5. Replication between PSCs occurs every 30 seconds.
  6. A vCenter server can only point to one PSC.
  7. Starting 6.5 U1, a single PSC can manage up to 15 vCenter servers.
  8. 6.5 U1 supports up to 10 external PSCs in an SSO domain.
  9. An SSO Site is a logical boundary.
  10. Starting with version 6.5, you cannot re-point a vCenter server across SSO sites.  This WAS previously possible in version 6.0.
  11. Enhanced Linked Mode requires an External PSC. 
Recommended PSC Topology:
  1. Create as few replication agreements as possible, while preventing PSC Isolation.
  2. A Ring Topology is recommended. (Linear)
Restore Information:
  1. In the event that all your PSC instances have failed, and you have no good backups, you will need to REINSTALL your entire environment.
  2. vCenter Server and PSC Restore Work Flow information.
  3. Restoring a vCenter Server Environment with multiple PSCs:
    1. Restore a Single Failed PSC.
      1. Deploy a New PSC instance and join it to an active PSC in the same vCenter SSO domain and site.
    1. Restore All Failed PSC Instances:
      1. Restore the Most Recently Backed Up PSC VM.
      2. Run the vcenter-restore Script registered with the restored PSC.
      3. Deploy Additional PSC instances and join them to the same vCenter SSO domain.
      4. Repoint back the connections between vCenter and PSC Instances.

Important Commands:
  1. vdcrepadmin – The command is located in the following directory of the PSC: /usr/lib/vmware-vmdir/bin.  KB 2127057
    1. Showservers – Displays all the PSCs in a vSphere domain.
      1. Ex. vdcrepadmin -f showservers -h psc1.vmware.local -u administrator -w VMw@re123
    2. Showpartners – Displays the current partnerships from a single PSC within a vSphere Domain
      1. Ex. vdcrepadmin -f showpartners -h psc1.vmware.local -u administrator -w VMw@re123
    3. Showpartnerstatus – Displays the current replication status of a PSC and any of the replication partners of the PSC
      1. Ex. vdcrepadmin -f showpartnerstatus -h localhost -u administrator -w VMw@re123
    4. Createagreement and removeagreement – Allows for the creation and removal of additional replication agreements between PSCs in a vSphere domain.
      1. Ex. vdcrepadmin -f createagreement -2 -h psc1.vmware.local -H psc4.vmware.local -u Administrator -w VMw@re123
      2. vdcrepadmin -f removeagreement -2 -h psc1.vmware.local -H psc3.vmware.local -u Administrator -w VMw@re123
  2. cmsso-util – Command used to repoint between external PSC within a site.  KB2113917.
    1. Ex. cmsso-util repoint --repoint-psc systemname_of_second_PSC


Monday, August 14, 2017

Storage vMotion Error: A general system error occurred: PBM error occurred during PreMigrateCheckCallback: Connection refused

I just tried to perform a Storage vMotion on a VM and received the following error:


I took a look at the services running on the vCSA by running "service-control --status".  It appears the VMware vSphere Profile-Driven Storage Service (vmware-sps) had stopped.


To get the service running, just run the following command:  service-control --start vmware-sps


I was then able to successfully perform a storage vMotion.

Bonus info:
Here's a list of services running on the vsphere 6.X vCSA:



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