"Index: 0, Size: 0" Error when attempting to add a hard disk or a NIC to a Cloud Director virtual machine
search cancel

"Index: 0, Size: 0" Error when attempting to add a hard disk or a NIC to a Cloud Director virtual machine

book

Article ID: 324408

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • When attempting to add a hard disk to a Cloud Director virtual machine, there is an error of the form:               Index: 0, Size: 0 
  • When we try to add the second NIC to the VM, the below error is encountered:
[xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx ] Index 0 out of bounds for length 0
  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log file shows entries similar to:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:659)
at java.util.ArrayList.get(ArrayList.java:435)
at com.vmware.ssdc.backend.dao.impl.VAppVirtualMachineDaoImpl.getStorageContainerValRefForVappVm(VAppVirtualMachineDaoImpl.java:127)


Environment

VMware Cloud Director for Service Provider 10.x

Cause

This can be caused by missing "dstore_moref" values in the Cloud Director database's "vm" table.

Resolution

To resolve this issue, please open a Support Request with VMware Technical Support and reference this KB article 89653.
Database modifications may be required to resolve this issue and will require VMware Technical Support assistance.

Additional Information