VMware vCloud Director showed me that one of the vApps/VMs was pending state. It seems this pending state lasted forever, so some troubleshooting was needed.
Restarting the vCloud Director service doesn’t make any difference. While a vApp is in pending state, you’re not allowed to change anything in the vApp and VMs contained in the vApp.
The only way to solve this issue is editing the vCloud Director database. I’ve found an valuable article on this by James Bowling over at vsential.com. Although it pointed me in the good direction, it was not a 100% solution in my case.
The first step is to copy IDs of the vApp and VMs that are in pending state. These ID’s are available in the vCloud Director interface in the Activity Task Detail pane. For example:
The next step is to stop all your vCloud Director cells, preferable follow the procedure pointed out in this article. Because you’re editing the database, it is a very good idea to make a backup of vCloud Director database before changing anything.
Note: I’ve done everything in a testing environment, be very careful in production environments!
First we will edit two tables, the dbo.vm table and the dbo.vm_container table. As James pointed out in his article, look for the status DELETING_CONTENTS and change this to RESOLVED. Confirm you’re editing the correct vApp/VM using the earlier recorded vApp & VM id’s. For example:
After changing the tables you can start the vCloud Director cell using service vmware-vcd start. Monitor the startup process using tail -f /opt/vmware/vcloud-director/logs/cell.log.
Unfortunately the vApp/VM was still in pending state in vCloud Director in my case. A little additional investigation showed me there’s a third table to change, the dbo.vm_vapp table:
After changing this table row also to RESOLVED, I’ve started the vCD service again. After a little while (yes, you have to have some patience) things became normal and I was able to start the vApp and change its configuration.