Hi there,
I'm struggling around with this special issue.
We have some vRO subscriptions in vRA to clear DNS-Records and AD-Computer Accounts after destroying deployments. In case of destroying something this is working fine.
But in case of reprovision we often get timing issues. If a computer account gets deleted and recreated shortly afterwards, it often happens that the "create AD Account" Job fails and and the new deployed VM joins into a wrong OU (default OU Computers) to AD where many of our necessary GPOs are not linked.
My big question is. How can vRO distinguish between reprovision and a completely unprovision (destroy)??
Because the cleanup job should only run if I give a destroy request
Or how should I setup the conditions for the subscriptions.
I've tried: VMPSMasterWorkflow32.Disposing and VMPSMasterWorkflow32.Unprovision -> both states seems to be used in reprovision AND destroy. Therefore -> useless for my purpose.
I need a condition which can differentiate between destroy and reprovision.
Does anyone have any ideas?
Many Thanks in advance
This is what I am doing for this use case....
First step was to create a subscription based on an event to reprovision "VMPSMasterWorkflow32.Active.EVENT.onReprovision"
The subscription will launch a workflow that will open a change request to reprovision and then I add some properties to the vm entity that the re-build and the DECOM part of the process will look for
"VirtualMachine.Reprovision" = true
"VirtualMachine.SNoW.Reprovision.chgID"
"VirtualMachine.SNoW.Reprovision.chgNUM"
I have used these properties as criteria for other subscription like release IP, DNS ect. Those subscription will not fire for any reprovision requests. Same rules apply for the build and requesting IP ect.
Once the rebuild is complete then the end of the workflow will remove those reprovision properties before being released back to the customer
Hope this helps
as for the pre-create of AD accounts I have been using this solution for a while now and it has been working well for me: GitHub - dailyhypervisor/ad-computer-management: Workflow package to add / remove computer objects f...
Reprovision isn't a state like the others because it's a day-2 action that can be enabled and executed. Therefore, you'd have to use an Active Event which is called onReprovision to trigger specific behavior.
hmm... in my special case i have less ToDo's in case of reprovisioning.
Therfore my trigger must be able to say vRA to skip some following workflows... I'm not sure if this is possible.
As I can see in documentations there are only 4 Active Events:
Maybe a can use this onReprovision event to pin a additional custom property on the vm?!
Sorry I didn't use active events so far.
PS:
Are we the only one who wants to pre-create AD-Accounts in suggested OU? What would be the best and most stable solution for this?
This is what I am doing for this use case....
First step was to create a subscription based on an event to reprovision "VMPSMasterWorkflow32.Active.EVENT.onReprovision"
The subscription will launch a workflow that will open a change request to reprovision and then I add some properties to the vm entity that the re-build and the DECOM part of the process will look for
"VirtualMachine.Reprovision" = true
"VirtualMachine.SNoW.Reprovision.chgID"
"VirtualMachine.SNoW.Reprovision.chgNUM"
I have used these properties as criteria for other subscription like release IP, DNS ect. Those subscription will not fire for any reprovision requests. Same rules apply for the build and requesting IP ect.
Once the rebuild is complete then the end of the workflow will remove those reprovision properties before being released back to the customer
Hope this helps
as for the pre-create of AD accounts I have been using this solution for a while now and it has been working well for me: GitHub - dailyhypervisor/ad-computer-management: Workflow package to add / remove computer objects f...
Hi bluefocus01
I had to solve a similar issue for a customer of ours. Basically it boils down to the problem that you'd like to find out what the original user resource action request is.
Check out my solution to this problem:
Re: How to get the ResourceActionRequest from the EventManager Payload (reconfigure task)
Hope it helps.
Cheers
Daniele
Hi sbeaver,
Perfectly, now it works. Thanks for the hint!