VM fail to power on from vCloud
search cancel

VM fail to power on from vCloud

book

Article ID: 420876

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • A specific Virtual Machine (VM) in a vApp cannot be managed or modified via the VMware Cloud Director (VCD) UI or API.
  • While powering on VM the following error is displayed:
    Could not find object with moref "<VM_MOREF>" and VC ID "<VC_UUID>" in inventory category "VirtualMachine"
  • In the underlying vSphere Client inventory, the target VM appears twice (original and a clone).
  • Logs or database analysis reveal that VCD database tables reference multiple divergent Managed Object References (MoRefs) for the same entity.
  • Attempts to manually update the VCD database to point to the correct MoRef fail or revert immediately.
  • The VM in VCD is referring to the "Name in vSphere" as [VM_Name]-clone on the General panel

Environment

10.x

 

Cause

This issue is caused by a "split-brain" inventory state where a VM exists as both an original and a clone within vSphere. This duplication creates a conflict in the VCD PostgreSQL database, where the system cannot lock onto a singular, valid MoRef for the VM entity. As a result, VCD references become stale or corrupted, preventing management operations.

Resolution

To resolve this issue, the VM must be completely dissociated from its stale VCD record and re-imported as a new entity.

1. Clean up VMware Cloud Director

  1. Log in to the VMware Cloud Director UI.
  2. Locate the problematic VM and Delete it. This step removes the corrupted rows from the VCD database.

2. Clean the Virtual Machine Configuration (vSphere)

Log in to the vSphere Client.

Power Off the target VM.

  1. Locate the VM's .vmx configuration file.
  2. Edit the .vmx file and remove the line containing cloud.uuid.

Example: cloud.uuid = "50 12 34 56..."

3. Reset vCenter Inventory

  1. In the vSphere Client, right-click the VM and select Remove from Inventory (Unregister). DO NOT DELETE FROM DISK
  2. Navigate to the datastore where the VM files are located.
  3. Right-click the .vmx file and select Register VM. Follow the wizard to add it back to the inventory.

4. Re-Import into Cloud Director

  1. Log in to the VMware Cloud Director UI.
  2. Navigate to the target Organization and vApp.
  3. Select Actions > Add VM > Import from vCenter.
  4. Select the newly registered VM from the list.
  5. Complete the import wizard.

Additional Information

Manually editing VCD database tables to fix MoRef mismatches is generally ineffective for this specific issue, as the inventory synchronization service will overwrite manual changes as long as the duplicate entities exist in vSphere. The re-import process is the only supported method to generate a clean, conflict-free database entry.