Introduction

This will be another quick post to let you know how you can solve a “stuck” vAPP in VMware Cloud Director (VCD). A “stuck” vAPP is a vAPP that does not hold any state, a vAPP that does not allow actions and a vAPP that cannot be managed through the HTML5 client as a System Administrator or Organization Owner.

How do I recognize a “stuck” vAPP? Well, have a look at the below figure. You can clearly see that the vAPP does not have any options, and the vAPP is in a forever “Busy” state. This particular vAPP also does not have any VM’s registered to it anymore. This is why we want to remove the vAPP.

Stuck vAPP in VCD
Stuck vAPP in VCD

However, how do we remove the vAPP if there are no actions that we can execute against it? Well for this we have to go into the Postgresql ‘vcloud’ database and look the VM up and remove it’s record. If you are not familiar with Postgresql or the ‘vcloud’ database environment don’t worry I got you covered. You can just follow the next couple of simple steps to remove the “stuck” vAPP from your environment.

Solution

So let’s get right to it. Please remember that we will be editing the Postgresql database on the VCD Cell, so if you do not feel comfortable with this, you can do the following:

  • Shutdown all VCD Cells.
  • Snapshot all VCD Cells.
  • Start all VCD Cells

So now that we’ve done this, we can go ahead and login to the VCD Cell through a SSH connection. Once you’ve done this enter the following commands to enter the ‘vcloud’ database:

Next up, we need to identify the name of the VCD database in Postgresql.You can do this by entering the following command:

Listing the VCD Postgresql databases
Listing the VCD Postgresql databases

As you can see, we have followed the defaults on this and the database name is called ‘vcloud’. Now we are going to connect to it by entering the following commands:

Once you’ve done this we are now ready to execute some commands. First we need to identify the vAPP that is “stuck”. There are two ways (actually three including the API) we can do this, either by finding the vAPP ID from the VCD HTML5 UI like the figure below (You can get this in the Administration -> Events overview). Have a look at the yellow marked ID (I’ve blocked out some parts for obvious reasons):

VCD Event details to find vAPP ID
VCD Event details to find vAPP ID

Or by just simply digging through the ‘vcloud’ database and finding the vAPP with it’s name. You can do this by entering the following command:

This should yield one long piece of information regarding the specific vAPP we need. You can use this information to specifically filter away some information we don’t need by entering the following command:

In this particular situation the “Creation_Status” was “Resolved”. Normally if you have a “stuck” vAPP, this state would show either “DELETING_CONTENTS” or “UNRESOLVED”. In our situation this wasn’t the case, but the vAPP was stuck eitherway. You can also easily check for all “stuck” or faulty vAPP in the VCD database by entering the following psql commands:

Now in this next part we are going to delete the vAPP entry from the ‘vcloud’ database. Like I said before, if you are not comfortable with this, follow the prerequisites I mentioned earlier:

At this point the record is deleted. We can double-check this by re-entering the previous command that showed us the vAPP:

Like myself, you should now see that the above command no longer yields results. Great! Now let’s go back into the VCD HTML5 UI and have a look at the available vAPPs.

VCD HTML5 vAPP UI
VCD HTML5 vAPP UI

Eureka! The “stuck” vAPP is completely removed from the database, and from the UI. This means we are done!

I hope this blog post is informational for everybody. Until the next blogpost!

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *