Hello,
when I destroyed a Virtual Machine some error occurred so the Virtual Machine hasn't been destroyed correctly.
Actually the VM itself has been deleted (checked it in vCenter), but it still appears in the management of vRealize Automation so it hasn't been deleted in the database I guess.
When I click on "View Details" of this VM there's the error message "MachineID parameter missing.". How can I also delete this item in vRealize Automation Database, because the VM doesn't exist anymore?
Best Regards
Jens
If you are able to find the item from the Database then you can just find the respective ID column which will contain the GUID. Just get the GUID and paste it in the below id place holder.
Update cat_resource SET status='DELETED' WHERE id='506e4706-07cf-4fad-9fb1-e76fa5f32206';
(Here replace the id of item that got deleted in vCAC and execute the above query.)
If you go into Managed Machines (Infrastructure > Machines > Managed Machines) and delete it there. I *think* that will take care of your problem.
Let me know how you get on.
Grant
Hi Grant,
actually I also tried this first, but it isn't in the list of the Managed Machines anymore. So I can't delete it there. I'm going to try the solution of the provided Knowledge Article when I have time and let you know if this solved my problem 🙂
Hello kumarankpl,
thanks for your links to the KB article. I was able to perform steps 1 to 5, but when I execute the Shell-Script in step 6 after entering the password I get the message: "Ressource <machine name> does not exist." Do you know what I did wrong or what else I could try? I am using the newest release of vRealize Automation.
Thanks and Kind Regards
Jens
Are you still able to see the VM in Items Tab?
Yes, it is still visible in the Items-Tab but nowhere else (not in Infrastructure->Machines->Managed Machines or something like this).
Update: Now I could delete the machine / run the script with success but the VM is still in the Items-Tab.
Message was edited by: JensVM
Maybe it helps, here is some more information about the error that occured when I destroyed the VM:
DEM-Worker Error Message:
Workflow 'ServiceCatalogDeleteResource' failed with the following exception: Machine <Machinename>: Request update in service catalog failed Machine <Machinename>: Failed to delete the catalog item One or more errors occurred... Inner Exception: Machine <Machinename>: Failed to delete the catalog item One or more errors occurred..
Stack trace:
at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Inner Exception: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Can you connect to Postgress Database and execute the below query ? Select * from cat_resource; and see whether the VM Name exist? And issue seems to be failure while destroying the VM. So the IAAS is not able to notify the vCAC so its not deleted from the Items tab.
Hello kumarankpl,
I executed this SQL-Query on the postgress database and the machine name is still in the database.
Update: The state of the VM is ACTIVE in the database.
Message was edited by: JensVM
If you are able to find the item from the Database then you can just find the respective ID column which will contain the GUID. Just get the GUID and paste it in the below id place holder.
Update cat_resource SET status='DELETED' WHERE id='506e4706-07cf-4fad-9fb1-e76fa5f32206';
(Here replace the id of item that got deleted in vCAC and execute the above query.)
Nice work, just saw the response on Socialcast!
Grant
Thanks a lot that fixed my problem :-)!
Hi Kumaran,
I may have missed something,
I found the GUID for the missing VM and pasted the line you have mentioned in management studio, but I received the invalid object name against cat_resource
Well... you can also do it by name if you don't have any CatalogResources (CAFE Resources) named the same. where name = "CatalogResourceName"
But the CatalogResource part of it is the key. Just in case you may have the wrong ID, and since there are so many different IDs (the VC:VirtualMachine ID, the VCAC virtualMachine ID, VM unique ID, Binding IDs etc etc)... you have to make sure you are looking at the right one.
The ID you want for this is specifically the ID for the Café CatalogResource. You can see these IDs on these inventory objects in vRO.
Hi Kumar,
Even i am facing similar issue in our lab environment. Could you please let me know where i need to run this query? is that on PostgreSQL server?
Hi All.I have similar issue but with orphaned XaaS items. I can see them also in vRO client under "vRealize Automation" --> Ïtems" How could I remove them from vRA? I would appreciate any suggestions which vRA Postgres table holds that entries and how to get rid of them.