"java.lang.NullPointerException" error when deploying Virtual Machine in a vApp in VMware Cloud Director
search cancel

"java.lang.NullPointerException" error when deploying Virtual Machine in a vApp in VMware Cloud Director

book

Article ID: 320519

calendar_today

Updated On: 02-29-2024

Products

VMware Cloud Director

Issue/Introduction

Symptoms:

In the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, entries as below are logged:

com.vmware.ssdc.util.LMException: Error

  at com.vmware.ssdc.util.LMException.wrap(LMException.java:131)

  ...

Caused by: java.lang.NullPointerException

  at com.vmware.vcloud.val.internal.impl.VC20VirtualServer.moveVmIntoFolder(VC20VirtualServer.java:2331)

  at com.vmware.vcloud.val.internal.impl.VC20VirtualServer.relocate(VC20VirtualServer.java:2503)


Environment

VMware Cloud Director 10.x
VMware Cloud Director for Service Provider 10.x

Cause

This issue can occur if there are VMs within the vApp which are no longer known to the underlying vCenter.
The affected VMs will show in an
UNKNOWN state.

Resolution

This issue is not caused by a bug in Cloud Director.
This issue occurs because Cloud Director cannot get the correct information of the VMs which no longer exist in vCenter.

Workaround:
  1. Remove any VMs showing an UNKNOWN state from the affected vApp.
  2. Reconnect the vCenter
    1. Provider portal > Infrastructure resources > Choose the vCenter backing the vApp > Reconnect
  3. Create the new VMs