SeymourofOptemM
Contributor
Contributor

Destroying software component with destroying server

I have a blueprint with a software component to install some software and the build works 100%. The software component has an uninstall script to remove some software and if I manually run the uninstall script on a server and it works.

If I go in vRA under Item>Deployments highlight the server an select destroy. The destroy never destroys the software component so my uninstall under my software component never gets ran. The only way I found to get my uninstall to run was to go into the software component under the server under the Item>Deployment and destroy the software component then destroy the server. If I just destroy the server the software component doesn't get destroyed.

I have heard that vRA keeps the software component if the server gets destroyed? The client is not going to know to go in the software component an destroy it and then destroy the server. Is there a way if the client wants to destroy the server it will also destroy the software component so my uninstall will run?

2 Replies
willonit
Hot Shot
Hot Shot

Have you tried destroying the entire deployment rather than the individual components? I keep the server destroy action out of entitlements and just allow deployment destroy.

twoton
Enthusiast
Enthusiast

OMG you are a life saver!  I was going nuts trying to figure out why in the heck my uninstall scripts weren't executing for the software component pieces of a given deployment.  I didn't realize it only executed when you destroyed the deployment and not the machine itself.  I just tried it again but made sure I selected the deployment and everything is working!  I guess this makes sense though given the fact that I have a bunch of now orphaned software components in my items list that were parts of other machine deployments and stayed behind when the machine was destroyed...

0 Kudos