I'm creating a new workflow to create a VM and then make some advanced configuration changes afterward. I'm doing this by using the existing "Create custom virtual machine" workflow and then having the "Secure VM" workflow created by William Lam running afterwards. Each workflow runs fine by itself, but I want to be able to chain then together so that after the new VM is created, the "Secure VM" workflow will run on it.
I think what I need to do is somehow pass the name of the new VM from the OUT variable of the "Create custom virtual machine" workflow to the "vm" IN variable on the "Secure VM" workflow. I have no idea how to do this. I've watched a bunch of videos on YouTube that are close to what I want and I read a bunch of blog and forum posts that are also close. Is what I want to do even possible? Am I going about achieving my goal wrong?
Jason
Hi Jason,
It is certainly possible. You don't need to pass the name of the new VM; instead, you can use a so called workflow attribute to pass the whole VM object returned by 'Create custom virtual machine' workflow as an input to the 'Secure VM' workflow.
So the steps could be something like:
That is all. You can also click on each workflow element, open it for edit, and go to its 'Visual Binding' tab to ensure that the mapping links are correct - for the first element, there should be a link from out attribute newVM to out attribute newVM, and for second element there should be a link from newVM in attribute to the corresponding input parameter of type VC:VirtualMachine.
Hi Jason,
It is certainly possible. You don't need to pass the name of the new VM; instead, you can use a so called workflow attribute to pass the whole VM object returned by 'Create custom virtual machine' workflow as an input to the 'Secure VM' workflow.
So the steps could be something like:
That is all. You can also click on each workflow element, open it for edit, and go to its 'Visual Binding' tab to ensure that the mapping links are correct - for the first element, there should be a link from out attribute newVM to out attribute newVM, and for second element there should be a link from newVM in attribute to the corresponding input parameter of type VC:VirtualMachine.
That did it! Thanks for your help.