vCloud Director for SP 8.X – Unable to add disks – PBM error occurred during PreMigrationCheckCallback: vmodl.fault.InvalidArgument

UPDATE: 6/5/2018 : A script is now available that can report/resolve this issue which is available at the end of this post.

So a bug exists in the upgrade from vCenter 5.5 to vCenter 6.0 which affects vCloud; for a large of virtual machines when attempting to add disks through vCloud Director the task would fail with A general system error occurred: PBM error occurred during PreMigrateCheckCallback: vmodl.fault.InvalidArgument. This seems to affect a bunch of machines at random and didn’t seem to matter which Storage Tier or which vCenter they were hosted on. 

So after some further investigation it has been discovered that this is due to a configuration mismatch between the Storage Profile on the VM in vCenter and the storage profile in vCenter. It appears that vCloud is attempting to Storage vMotion the machine to the correct tier which fails and shouldn’t occur as its already in the right spot.

To confirm this log into the vCenter and open the vpxd.log (C:\ProgramData\VMware\vCenterServer\logs\vmware-vpx) for Windows and look for the Exception “Invalid home profile setting. Host and datastore are not changed. May use VM reconfig instead”

The Fix

The VMWare vCloud support team has confirmed this as a bug affecting multiple customers caused by the vCenter upgrade but no official guidance exists to resolve. A tested solution that I have verified actually resolves this is to perform the following;

  1.  From vCloud Director check the Default Storage Profile (General tab) of the  on the affected Virtual Machine and if there are any overrides present (Hardware tab)
  2. Logon to the vCenter Server which host the machine and from the Manage menu of the affected VM select Policies and click Edit VM Storage Policies
  3. Select the correct Storage Profile and click Apply to all NOTE: If it was already set to the correct Tier; select something else (eg. Change it to Datastore Default) then click Apply to all followed be reselecting the correct settings; this is to ensure the UI recognizes a change has actually occurred and make the calls to the Virtual Center Service to apply the changes
  4. Go back into vCloud and add the disk; and volla !

Automated Report and Fix

I have developed a script which can be run against vCloud Director to determine which machines are affected and also automate resolving this issue. Enjoy.