Error : "Index 0 out of bounds for length 0" when adding a disk or a network adapter to a Cloud Director virtual machine
search cancel

Error : "Index 0 out of bounds for length 0" when adding a disk or a network adapter to a Cloud Director virtual machine

book

Article ID: 324408

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Adding a hard disk or network adapter to a Cloud Director virtual machine(VM) from the UI, there is an error of the form:   
    [ ########-####-####-####-############ ] 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 10.x

Cause

  1. Missing "dstore_moref" values for the VM entry in the Cloud Director database.
  2. When VM entry in the database has the wrong datastore reference i.e. VM resides on another datastore in vCenter.

Resolution

For assistance, contact technical support and note this Knowledge Article ID (324408) in the problem description. For more information, see How to Submit a Support Request.

Additional Information