top of page

Attempting to edit a VM, it fails with an error "index 0 out of bounds for length 0"

When I attempting to modify configuration of  a virtual machine in Cloud Director, there is an error of the form: index 0 out of bounds for length 0


Error:


In this blog I will show you how I check and fix the issue


Steps:

  • SSH Primary Cell, login as a root

  • Backup DB

  • Type "sudo -su postgress psql vcloud"

  • Type \x so that you have good display

  • Type below command to SSH and Run


Note: With the above command, we have identified about 44 VMs have null value against dstore_moref in vm table and all are exhibiting the same problem.


  • We have re-populated the missing entries in the vm table with the correct Datastore moref for the VM's home location

  • in SSH Type update vm set dstore_moref = 'moref_of_datastore' where id = 'id_of_vm";

  • Post updating the vm table with dstore_moref value, we could able to edit and make changes to the VMs from vCD UI.


Note: This is my personal and owned experience that I love to share in the VMware Community. I hope you appreciate it, thank you

Recent Posts

See All

Can't delete vApp and VM

Error: [ bfe374cf-fd73-4076-86da-e842ba50b13a ] No row with the given identifier exists: [com.vmware.vcloud.common.model.logicalresource.VdcLogicalResourceModel#f8e04f29-5810-4fe6-9178-94b7ab049f25] W

bottom of page