Unable to resize the existing disk in VMware Aria Automation.
search cancel

Unable to resize the existing disk in VMware Aria Automation.

book

Article ID: 381472

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

The request fails in the GUI with an error similar to:

Error: Resizing the disk failed. Cause: [: No linked machine found. Cannot proceed with resize operation]

Environment

VMware Aria Automation 8.x

Cause

  1. This issue can be related to multiple endpoints connected to one VM disk.

Resolution

 
1. Issue Analysis
  • Potential Root Cause: The resize operation validates the disk against the first endpoint listed in its configuration. The target disk (EX:bf78b09a-#######) has multiple endpoints, and the first one in the list does not match the endpoint of the VM to which the disk is attached, causing the validation to fail.
  • Scope: This is not an isolated incident. A query has identified a total no. of disks in the environment that are in a similar state (attached, with more than one endpoint).
 

2. Action Plan: Workaround & Revert Steps
we recommended you to execute the following queries against the provisioning-db. If you do not have a development environment, a revert step is included for safety.

Step A: Apply the Workaround
This query removes the extraneous endpoints from the affected disk, leaving only the correct one associated with its VM.

Example:
UPDATE disk_state 
SET endpoint_links = json_build_array('/resources/endpoints/a405c202-#######') 
WHERE document_self_link = '/resources/disks/bf78b09a-#######';


Step B: Test the Fix
After executing the query, wait a few moments and then attempt to resize the disk again to confirm the fix is effective.

Step C: Revert (If Necessary)
If the workaround does not resolve the issue, run the following query to restore the disk to its original state.

Example:
UPDATE disk_state 
SET endpoint_links = json_build_array(
    '/resources/endpoints/1ac5001f-#######', 
    '/resources/endpoints/b9eda07e-#######', 
    '/resources/endpoints/f6841bda-#######',

WHERE document_self_link = '/resources/disks/bf78b09a-#######';

 

3. Information Required from the customer side
Before proceeding, please clarify the following points:
  1. Take a snapshot and backup database.
  2. Apply the proposed workaround (Step A) and test it. Please confirm how the resize operation will be tested.
  3. Prepared to collect a new set of logs and dumps after the workaround is applied and tested
 
4. Appendix: Query to Identify All Affected Disks
The following query was used to generate Affected_disks.csv and can be run to identify all disks with more than one endpoint. The script from the action plan can be adapted to fix these other disks as well.
 
SELECT
    document_self_link,name,
    jsonb_array_length(endpoint_links) AS endpoint_links_count,
    custom_properties->>'__virtualMachineLink' AS vm,
    type, boot_order,
    custom_properties ->> '__controllerKey' as controller_key,
    custom_properties ->> '__controllerUnitNumber' as controller_unit,
    origin,
    status
FROM
    disk_state
WHERE
    endpoint_links IS NOT NULL and jsonb_array_length(endpoint_links) > 1
    AND status = 'ATTACHED'
ORDER BY name ASC;

 

Additional Information

The below query lists also shows the name of the disk and its VM along with the endpoint_name, org_link and the username. 
Also, note that all of the affected disks belong to the same org. So the issue is contained within an org.

 

SELECT
    d.name AS disk_name,
    c.name AS vm,
    es.name AS endpoint_name,
    jsonb_array_length(d.endpoint_links) AS endpoint_links_count,
    d.type,
    d.origin,
    d.status,
    d.tenant_links->>0 AS org_link,
    substring(t.value FROM '/owner/provisioning/auth/csp/users/(.*)') AS username
FROM
    disk_state d
        JOIN compute_state c
             ON d.custom_properties->>'__virtualMachineLink' = c.document_self_link
        JOIN endpoint_state es
             ON c.endpoint_links->>0 = es.document_self_link
        LEFT JOIN LATERAL (
        SELECT value
        FROM jsonb_array_elements_text(d.tenant_links::jsonb) AS t(value)
        WHERE t.value LIKE '%/owner/provisioning/auth/csp/users/%'
        LIMIT 1
        ) t ON true
WHERE
    d.endpoint_links IS NOT NULL
  AND jsonb_array_length(d.endpoint_links) > 1
  AND d.status = 'ATTACHED'
ORDER BY d.name ASC;