Error: "java.lang.NullPointerException at com.vmware.ssdc.library.types.DatastoreURL.hashCode(DatastoreURL.java:20)" when deploying or editing a Virtual Machine
search cancel

Error: "java.lang.NullPointerException at com.vmware.ssdc.library.types.DatastoreURL.hashCode(DatastoreURL.java:20)" when deploying or editing a Virtual Machine

book

Article ID: 370415

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • You are deploying or editing a Virtual Machine (VM) in VMware Cloud Director (VCD).
  • In the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, entries as below are logged:

java.lang.NullPointerException
        at com.vmware.ssdc.library.types.DatastoreURL.hashCode(DatastoreURL.java:20)
        at java.base/java.util.Arrays.hashCode(Arrays.java:4685)
        at java.base/java.util.Objects.hash(Objects.java:146)
        at com.vmware.vcloud.fabric.storage.placement.filters.DatastoreData.hashCode(DatastoreData.java:180)

  • VCD was recently upgraded from an earlier release.
  • In the VCD Provider Portal under Resources > Infrastructure Resources > vCenter Server Instances there are vCenter Servers with Usage equal to None.
  • Unable to compose and reconfigure VMs in vCD.
  • Tenants have problems with deploy new VMs and reconfigure existing VMs.

Environment

VMware Cloud Director 10.5.1.1

VMware Cloud Director 10.6.1.2

Cause

This issue can occur if there are missing URLs in the datastore_inv table of the VCD database associated with an unused vCenter instance with Usage equal to None.

Resolution

To resolve the issue, you can remove any vCenter instance that is not being used in the VCD environment with a Usage status of None.

Refer the document for removal of the vCenter instance from VCD: Unregister a vCenter Server Instance From Your VMware Cloud Director.

Alternatively if the vCenter Server is to be retained it can be utilized to change its Usage from None to a valid option.

  1. To set the Usage to IaaS, create a Provider VDC using resources from this vCenter Server.
  2. To set the Usage to SDDC, enable Tenant Access to this vCenter Server.

Additional Information

The 'Usage' column can be any of the following three values:

None: The vCenter Server is registered to VCD, but it is currently idle. It is not backing any Provider Virtual Datacenters (Provider VDCs) for standard compute, nor is it configured for direct tenant access. This state is expected immediately after attaching a new vCenter Server before resources are actively allocated.

IaaS: The vCenter Server is actively providing standard Infrastructure-as-a-Service (IaaS) compute. Its physical clusters and resource pools are mapped to one or more Provider VDCs, which in turn back Organization VDCs.

SDDC: The vCenter Server is configured as a Dedicated vCenter (historically associated with Central Point of Management or CPOM). It is published directly to a specific tenant.