"Internal Server Error - Caused by: java.lang.NullPointerException at getVmModelVersionNumberByCloudUuid" when importing a VM in VMware Cloud Director 10.4.2
search cancel

"Internal Server Error - Caused by: java.lang.NullPointerException at getVmModelVersionNumberByCloudUuid" when importing a VM in VMware Cloud Director 10.4.2

book

Article ID: 325548

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Unable to import a VM from vCenter into Cloud Director using the Import from vCenter function with the Move Virtual Machine (delete source) option enabled due to an error:
Internal Server Error
  • The VM in vCenter to be imported has a cloud.uuid parameter in its Advanced Configuration Parameters.
  • An error similar to the below can be seen in the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log on the cells:
Caused by: java.lang.NullPointerException
        at com.vmware.vcloud.inventory.dao.impl.VirtualMachineRTDaoImpl.getVmModelVersionNumberByCloudUuid(VirtualMachineRTDaoImpl.java:59)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)


Environment

VMware Cloud Director 10.x

Cause

VMware Cloud Director 10.4.2 has a known issue importing a VM from vCenter Server by using the move operation if the VM to be imported has a configured cloud.uuid parameter in its Advanced Configuration Parameters.
When a cloud.uuid parameter is present on the VM to be imported, Cloud Director attempts to confirm it does not already manage a VM with this cloud.uuid and this process can fail in VMware Cloud Director 10.4.2.

Resolution

This is a known issue affecting VMware Cloud Director 10.4.2.
The issue is resolved in VMware Cloud Director 10.4.2.1, available at VMware Downloads.


Workaround:

If Cloud Director cannot be upgraded then to workaround the issue remove the cloud.uuid from the VM in vCenter before importing it into Cloud Director:

  1. Log into the vSphere Client for the vCenter where the VM to be imported is located.
  2. Navigate to the VM to be imported which is not yet managed by Cloud Director, and open Edit Settings, Advanced Parameters.
  3. Filter for and locate the cloud.uuid parameter, delete the Value so it is blank, click the positive check mark, and click OK to save the change. By setting the cloud.uuid parameter to a blank value vSphere should remove it completely.
  4. Retry the import from the Cloud Director UI and it should now succeed.


Additional Information

For more information on the resolution for this issue see VMware Cloud Director 10.4.2.1 Release Notes - Resolved Issues.