Hi All,
WFStubMachineDisposing workflow gets executed when machine is destroyed by executing "Destroy VM" action or when an error happens during provisioning. Is it possible to know in WFStubMachineDisposing workflow how it got called i.e. "Destroy VM" action or error during provisioning?
Thanks,
The MachineDisposing stub will run even if a provisioning task fails, while the UnprovisionMachine stub will not. I guess you could write out a simple log entry at UnprovisionMachine to indicate that it has run, and that would be the implication that a machine was purposefully destroyed.
as documentation states
WFStubMachineDisposing
Customizable state change workflow that executes before a machine enters the Disposing state
Ref: vRealize Automation 6.2 Documentation Center
So if you are calling 'Destroy VM' Action, it will definitely call above workflow.
but at the same time let's say during machine provisioning, your machine is successfully created in the end point and going through additional bits of guest OS customisation etc.. this is still (post)provisioning stage where your request state in vRA console will show as 'In Progress', So if during this time something goes wrong, vRA might trigger destroy of VM.
The MachineDisposing stub will run even if a provisioning task fails, while the UnprovisionMachine stub will not. I guess you could write out a simple log entry at UnprovisionMachine to indicate that it has run, and that would be the implication that a machine was purposefully destroyed.
hmmm...Both Unprovisoning & MachineDisposing got executed when an exception is thrown in MachineProvisoning workflow. As per vmware documentation only MachineDisposing should be executed. I am on VRO 6.3.
Any help appreciated