How to prevent retiring a specific VM?


#1

How to prevent an user to retire a specific VM?

We want a user be able to retire anything BUT a specific vm,

that means, if he goes in the UI to lifecycle/retire a vm, CF/MIQ should prevent him to do it.


#2

@gmccullough @tinaafitz Can you help here?


#3

You can in automate do a check on retire method and if the selected machine is the one you don’t want to delete, just stop the retire process.
Not sure if you can use right access for this


#4

This could be handled from the automate state-machine but there is no logic behind the button to hide it in certain conditions.

For the automate case I would imagine that you tag the VM and then check for that tag at that the beginning of the retirement state-machine and exit the process.

In the gaprindashvili branch and upstream code base you could do something difference. We now support conditions on custom buttons. You would need to hide the real UI button and replace it with a custom button that could use a condition to show/hide the button on a specific VM.