The Day 2 action to add disk resources fails with the error: Cannot invoke "Map.entrySet()" because "unitStatusMap" is null when Storage DRS is enabled.
search cancel

The Day 2 action to add disk resources fails with the error: Cannot invoke "Map.entrySet()" because "unitStatusMap" is null when Storage DRS is enabled.

book

Article ID: 388279

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

When Storage DRS is enabled, the disk creation process also includes the disk attachment step. Therefore, the addition of a SCSI controller (if needed) must be performed during the disk creation itself.

In this case, the disk creation process did not have the necessary connections to perform the "add controller" action, leading to the failure.

The workflow logs displayed as follows:

2024-11-05 18:10:59.235 +05:30infoResponse is {"id":"xxxxxxxxxxxxxxxxxxxx","name":"Add Disk","requestedBy":"administrator","actionId":"Cloud.vSphere.Machine.Add.Disk","deploymentId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","resourceIds":["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],"inputs":

{"name":"xxxxxxxxx-Disk2","encrypted":false,"capacityGb":60,"persistent":false,"constraints":"firecompartment:paza, tier:1, clustertype:rhel","SCSIController":"SCSI_Controller_1"}

,"status":"FAILED","details":"Cannot invoke \"Map.entrySet()\" because \"unitStatusMap\" is null","createdAt":"2024-11-05T12:40:13.881900Z","updatedAt":"2024-11-05T12:40:54.021542Z","totalTasks":6,"completedTasks":4}
2024-11-05 18:10:59.236 +05:30infoAdd disk task status: FAILED
2024-11-05 18:10:59.238 +05:30infoWe are proceeding to remove the disk from the VM as the disk attachment

Workflow logs is displayed as follows:

Environment

Aria Automation 8.18 and later 

Cause

The add disk API when being triggered on a datastore which is a part of a SDRS enabled cluster, fails to attain the required permissions to handle the SCSI controller creation

Resolution

Currently there is no resolution on this issue.

In a future release of VCF 9, the API call will be updated to automatically create a SCSI controller before adding a hard disk, addressing this issue.