No VMs Displayed When 'View VMs in All Tenants' Is Enabled

Problem

When the “View VMs in all Tenants” option is enabled in the PCD UI, no VMs are displayed, and the associated API call fails with the following error:

API call in PCD UI
Copy

Users could search and view specific VMs by name. However, when the “View VMs in all Tenants” option is disabled, VMs under the current tenant are displayed correctly.

CLI worked as expected for all-tenant queries (openstack server list --all-projects).

Environment

  • Private Cloud Director Virtualization - v2025.4 and Higher
  • Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
  • Compute API

Cause

A corrupted instance remained in the Compute database (nova-DB) due to a failure during VM provisioning (e.g., quota exceeded).

  • The instance record was left in an incomplete or ERROR state.
  • The corresponding request specification was missing from nova_api.request_specs.
  • When Nova attempted to fetch all VMs across tenants, it raised a KeyError, resulting in a 500 error.

This behaviour is noted as PCD-4177 for future improvement.

Diagnostics

  1. Error logs from the nova-api-osapi pod exposed a KeyError involving a specific instance UUID, indicating corruption or missing data for that instance. Example log snippet:
nova-api-osapi pod log
Copy
  1. Checking the nova database revealed the corrupted instance still present with vm_state=error and power_state=NOSTATE.
nova DB
Copy
  1. Querying the request_specs table in the nova_api database for the same instance UUID returned no results, confirming a missing request spec entry:
nova_api DB
Copy

The above commands are applicable only to Self-Hosted PCD-V environments. For SaaS environments, try deleting the VM that entered the "Error" state during creation, or reach out to the Platform9 support team for further assistance.

  1. Check VM status using below command :
Command
Copy
  1. No event history for the VM, which confirms the VM entered the "Error" state during the creation process:
Command
Copy

Resolution

The corrupted VM deleted using below command:

Command
Copy

This restored normal functionality for both the UI and the API, allowing full visibility of VMs across tenant boundaries.

Validation

  • Verified UI no longer shows blank list when “View VMs in All Tenants” is enabled.
  • Cross-tenant VM visibility works as expected.
  • No further 500 errors observed in related logs.
  • API calls return valid responses without errors.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard