VCD deletes discovered named disks with error: No row with the given identifier exists
search cancel

VCD deletes discovered named disks with error: No row with the given identifier exists

book

Article ID: 423421

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

VMware Cloud Director (VCD) intermittently deletes named disks from the underlying vCenter Server environment. This occurs during the inventory reconciliation or discovery process.

Symptoms:

  • VCD logs report: No row with the given identifier exists:[com.vmware.vcloud.common.model.VirtualMachineModel#<XXXXX>].

  • Named disks are automatically deleted from the vCenter resource pool by the VCD service account.

  • The issue is often triggered by third-party automation tools creating disks in vCenter that do not conform to VCD’s expected naming convention or metadata requirements.

Environment

10.x

Cause

The VCD Inventory Collector identifies disks in vCenter that are located within an Organization VDC's resource pool but lacks a corresponding entry in the VCD database. If an external automation tool creates these disks incorrectly, VCD attempts to "adopt" or "reconcile" them.

When the Hibernate persistence layer fails to find a valid VirtualMachineModel or DiskModel identifier for the object during this process, it throws a "No row with the given identifier" exception. Following its state-consistency logic, VCD identifies the disk as a "stray" or "unmanaged" object and issues a delete command to vCenter to align the physical environment with the VCD database.

Resolution

To resolve this issue and prevent further unintended deletions, follow these steps:

  1. Correct Automation Logic: Ensure that any deployment automation tool uses the VMware Cloud Director API rather than the vCenter API to create disks. Creating objects directly in vCenter within VCD-managed resource pools is unsupported and leads to reconciliation failures.

  2. Manual Cleanup of Stale Entries: If the automation tool has already created problematic disks:

    • Stop the automation tool.

    • Manually delete the incorrectly created disks from the vCenter inventory to ensure no stale objects remain.

  3. Disable Discovery (Workaround): If immediate automation fixes are not possible, you can temporarily disable VM/Disk discovery to stop VCD from attempting to process these objects:

    • Navigate to Cloud Resources > vCenters.

    • Disable Enable VM Discovery for the affected vCenter.