Reconciling Managed Virtual Disk Catalog Using the vSphere Web Services API.
search cancel

Reconciling Managed Virtual Disk Catalog Using the vSphere Web Services API.

book

Article ID: 308455

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article explains the use of the several ReconcileDatastore methods in the Web Services API. The reconciliation operation applies to managed virtual disks, which are independent virtual storage objects that vSphere can create and maintain apart from any attachment to a virtual machine.

Symptoms:
Managed virtual disks appear to be temporarily missing from the vSphere inventory.

Environment

VMware vSphere ESXi 6.5
VMware vCenter Server 6.5.x

Cause

In rare cases, the vSphere inventory of managed virtual disks can become temporarily out of synch with datastore disk backing metadata. This can be due to a transient condition, such as an I/O error, or it can happen if a datastore is briefly inaccessible. This problem has been observed only under stress testing.

Resolution

Any time the inventory of managed virtual disks appears incorrect, you can invoke a Web Services API method that corrects the problem. This problem is rare in testing, but a discrepancy in the inventory can occur any time you lose a datastore, or when you create or delete a managed virtual disk using a tool other than the vSphere Web Client or the VStorageObjectManager interface in the Web Services API.

Whenever you suspect a discrepancy in the inventory, you can perform catalog reconciliation. Due to the performance impact, you should reconcile only when needed. Catalog reconciliation can take minutes.

To reconcile the catalog using the Web Services API, use one of the following methods:
  • For vCenter Server:
    • ReconcileDatastoreInventory_Task
    • ScheduleReconcileDatastoreInventory
  • For ESXi:
    • HostReconcileDatastoreInventory_Task
    • HostScheduleReconcileDatastoreInventory

To reconcile the managed virtual disk inventory from a Web browser, use the VMware Managed Object Browser to invoke a Web Services method. For example:
  1. Connect to https://server/mob.
  2. Click Content.
  3. Click the link associated with the property rootFolder.
  4. Click the link associated with the property childEntity.
  5. Click one of the links associated with the property dataStore. Choose the datastore that holds the missing managed virtual disk.
  6. Select and copy the value of the Managed Object ID at the top of the window. For example, datastore-1.
  7. Click the Home tab to return to the Service Instance.
  8. Click Content.
  9. Click vStorageObjectManager.
  10. Click ReconcileDatastoreInventory_Task. A popup window opens to show the method.
  11. In the Value field, replace MOID with the managed object reference of the datastore that holds the missing managed virtual disk.
  12. Click Invoke Method.
  13. Click the link in the value field. This opens the Task object that tracks the progress of the reconciliation operation.
  14. Click info. If the value of the state field is "success", the reconciliation is done.