Error : "Index 0 out of bounds for length 0" when editing a Cloud Director VM
search cancel

Error : "Index 0 out of bounds for length 0" when editing a Cloud Director VM

book

Article ID: 324408

calendar_today

Updated On: 03-31-2025

Products

VMware Cloud Director

Issue/Introduction

  • Adding a hard disk, adding a network adapter, editing Guest OS Customization, or editing other settings of a Cloud Director Virtual Machine (VM) from the Tenant Portal UI fails with an error of the form:

    [ ########-####-####-####-############ ] Index 0 out of bounds for length 0

  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log file on the Cloud Director Cells 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.6.0.x
  • VMware Cloud Director 10.5.x
  • VMware Cloud Director 10.4.x

Cause

This issue can occur if there are missing or incorrect "dstore_moref" values for the VM entry in the Cloud Director database.
For example if the entry is NULL or the VM entry in the database has the wrong datastore reference, i.e. VM resides on another datastore in vCenter.

Resolution

This issue has been fixed in Cloud Director 10.6.1, see Release Notes.

If not able to upgrade to the fixed version, to 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