After cross vCenter migration of PVC's Storage policy, Health and Compliance status fails to not reflect in vCenter UI.
search cancel

After cross vCenter migration of PVC's Storage policy, Health and Compliance status fails to not reflect in vCenter UI.

book

Article ID: 408742

calendar_today

Updated On:

Products

VMware vSAN VMware vCenter Server

Issue/Introduction

  • Problem with state display of vSAN PVCs in vCenter
  • These VMs were migrated from another vCenter using a cross vCenter migration.
  • We had a kubernetes cluster configured that is using the vmware CSI.

 

Environment

  • VMware vCenter Server : 7.x 
  • vSAN : 7.x

Cause

  • This is a known issue with 7.0 U3 and currently there is no fix present.
  • CNS does not support cross vCenter relocation in 7.0.3 as this operation is unsupported and has not been tested by VMware. 

Resolution

  • Currently there is no permanent fix available and need to follow the workaround below.
  • We will need to manually perform an "Edit Storage policy" on the UI and re-applly the storage policy on the disk.
 
Workaround : 
 
1. Get All FCD ids with missing complaince status. 
 
 
 
 
2. Retrieve the path for all those FCDs:
 
a. https://<vc-ip>/mob/?moid=VStorageObjectManager
b. RetrieveVStorageObject
c. Put ID and datastore as "datastore-xxxx" 
d. Make a note of the filepath for this FCD ID.
 
3. To know which VM it is attached to :
 
a. SSH to vCenter
b. Open the VCDB :
 
#/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
 
c. Run following for each vmdk:
 
#SELECT name FROM vpx_entity WHERE id = (SELECT vm_id FROM vpx_vdevice_file_backing WHERE hard_device_backing_file_name ~ '<vmdk path>');
 
  Eg: # SELECT name FROM vpx_entity WHERE id = (SELECT vm_id FROM vpx_vdevice_file_backing WHERE hard_device_backing_file_name ~ 'XXXX-XXX-XXX-01-XXX-XXXX.vmdk');
 
d. Make a note of vm name.
 
4. Reconfigure the vm to update policy of the FCD.
 
a. Go to vCenter UI.
b. Go to above returned VM.
c. Right click on VM-> Edit settings -> Find the hard disk with the above path.
d. Change policy to "vSAN Default Storage Policy".