Storage migration (SvMotion) of management domain VMs from new datastore and removed old datastore from vCenter.
Message: “Platform Health Check Error [platform-vmsp-platform-validate-resources-vsphere-resources : unable to validate vSphere objects: unable to resolve datastore identifier Datastore:datastore-15: ServerFaultCode: The object ‘vim.Datastore:datastore-15’ has already been deleted or has not been completely created] [VCFMS-HEALTH-002]”Message: “Platform Health Check Error [platform-package-core : 1 of 1 resources are not ok: vmsp-platform wrong resource state: InProgress - package deployment failed.] [VCFMS-HEALTH-002]”
Error: "Source and target systems use different datastores" - Upgrade of VCF Components from 9.0 to 9.1 fails during Import Validation Precheck
Source and target systems use different datastores: Source=ds:///vmfs/volumes/###############/, Target=ds:///vmfs/volumes/###############/. Please configure and retry the operation or contact support if the issue persists. [VCFMS-PRECHECK-IMPORT-###]For this upgrade to proceed, the source and target datastores must be the same. Make necessary adjustments and retry. If the issue persists, please contact support.
Import Configuration Validation Precheck FailedImport precheck completed with errors. [VCFMS-PRECHECK-IMPORT-###]
The script attached to this KB can be used to resolve issues with VC and the VCF management components storage configuration after becoming out of sync. Follow the steps below for your scenario.
Follow the steps below based on the component (VIDB / VCFA):
Migrate the VCFA 9.0 component to use the same datastore that the 9.1 VCF services runtime will use, and then update its storage configuration to reflect the new datastore. All the following steps need to be performed in the 9.0.x cluster.
| Target Datastore URL | The precheck error message — format: ds:///vmfs/volumes/<uuid>/ |
| Datastore path | The vCenter inventory — format: /<DatacenterName>/datastore/<DatastoreName> |
| Datastore MoID | This can be seen from the vCenter URL for the datastore — format: Datastore:datastore-##Note: Select the datastore from vSphere Client Datastore Browser and the Browser URL will show the Datastore MoID. |
===============================================================
Execute the attached script to change the datastore information within the cluster. For this operation, connect to the control plane node and execute the script there.
vmware-system-user account./tmp/ on the control plane.sudo command:sudo -ichmod +x /tmp/datastore-remediation.shbash /tmp/datastore-remediation.sh --ds-url "ds:///vmfs/volumes/#######-####-####-####-############/" --vc-host "vcenter.example.com"bash /tmp/datastore-remediation.sh --ds-url "ds:///vmfs/volumes/#######-####-####-####-############/" --ds "/<DatacenterName>/datastore/<DatastoreName>" --ds-id "Datastore:datastore-<MoID>"--ds-url value with the target datastore noted down in Step 2.(i). For the "--ds" parameter, enter the datastore path noted down in Step 2.(i) and --ds-id with the datastore MoID from Step 2.(i).Updates the platform's datastore configuration — the platform was still pointing to the old datastore. The script updates 3 settings (the datastore URL, the datastore path and the datastore ID) to match where the data actually lives now.
Refreshes the storage class — the cluster has a storage class that tells it which datastore to use for new volumes. After the configuration is updated, the script deletes the stale storage class so the platform automatically re-creates it with the correct datastore. It takes a backup of the storage class before deleting it, and waits to confirm the new one is in place before it exits.
A successful run prints the following output to the console:
root [ /tmp ]# bash datastore-remediation.sh --ds-url "ds:///vmfs/volumes/vsan:###########-###########/" --vc-host "vcenter.example.com"
[INFO] Configuration:
Kubeconfig : <kubeconfig path>
Datastore path : (to be discovered from URL via vCenter)
Datastore URL : ds:///vmfs/volumes/vsan:###########-###########/
vCenter host : vcenter.example.com
vCenter user : [email protected]
[INFO] Step 0 — vCenter datastore validation
vCenter password for [email protected]:
[INFO] Testing vCenter connection at https://vcenter.example.com...
[INFO] vCenter connection established.
[INFO] Searching all vCenter datastores for URL 'ds:///vmfs/volumes/vsan:###########-###########/'...
[INFO] Auto-discovered --ds from vCenter: /<DatacenterName>/datastore/<DatastoreName>
[INFO] Querying vCenter for datastore '/<DatacenterName>/datastore/<DatastoreName>'...
[INFO] vCenter returned:
Datastore URL : ds:///vmfs/volumes/vsan:###########-###########/
Datastore ID : Datastore:datastore-##
[INFO] --ds-url matches vCenter.
[INFO] Auto-discovered --ds-id from vCenter: Datastore:datastore-##
[INFO] Validated values:
Datastore URL : ds:///vmfs/volumes/vsan:###########-###########/
Datastore ID : Datastore:datastore-##
[INFO] Starting datastore mismatch remediation...
[INFO] Step 1/6 — Backing up and deleting StorageClass vmsp-default...
[INFO] StorageClass backed up to /backuplocation/storageclass-vmsp-default-YYYYMMDD_HHMMSS.yaml
[INFO] Checking for delete-protection label...
[INFO] Removing delete-protection label...
storageclass.storage.k8s.io/vmsp-default patched
storageclass.storage.k8s.io "vmsp-default" deleted
[INFO] StorageClass deleted.
[INFO] Step 2/6 — Patching PackageDeployment: globalConfig.provider.vsphere.datastoreURL...
packagedeployment.releases.vmsp.vmware.com/vmsp-platform patched
[INFO] datastoreURL = ds:///vmfs/volumes/vsan:###########-###########/
[INFO] Step 3/6 — Patching PackageDeployment: provider.vsphere datastoreURL and datastore path...
packagedeployment.releases.vmsp.vmware.com/vmsp-platform patched
[INFO] datastoreURL = ds:///vmfs/volumes/vsan:###########-###########/
[INFO] datastore = /<DatacenterName>/datastore/<DatastoreName>
[INFO] Step 4/6 — Patching PackageDeployment: provider.vsphere.datastoreId (9.1)...
packagedeployment.releases.vmsp.vmware.com/vmsp-platform patched
[INFO] datastoreId = Datastore:datastore-##
[INFO] Step 5/6 — Waiting for StorageClass to be re-created (timeout: 120 s)...
[INFO] StorageClass re-created:
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
vmsp-default (default) csi.vsphere.vmware.com Delete WaitForFirstConsumer true 2s
[INFO] Step 6/6 — Waiting for PackageDeployment to be Successful (timeout: 30 minutes)...
packagedeployment.releases.vmsp.vmware.com/vmsp-platform condition met
[INFO] PackageDeployment is Successful!
========================================================================
[INFO] === REMEDIATION COMPLETED SUCCESSFULLY ===
[INFO]
[INFO] IMPORTANT: Before retrying the upgrade operation:
[INFO] 1. Verify that all nodes are in a Ready state
[INFO] 2. Ensure the cluster is fully stable
[INFO]
[INFO] Return to the VCF Lifecycle Management UI and retry the upgrade precheck.
========================================================================datastore-remediation.sh - 59956F2DDC5E47B80DC9353248236DFADE0DB612AEC65AF50BA2FF60745B2551