Copying and then modifying an existing workflow is something that is pretty common. We will go through this by using an example. We will copy and modify the Start virtual machine and wait workflow.
After duplicating the workflow, you can edit it.
The trick with modifying existing workflows is to understand what they are doing. This can be done simply by running the workflow and having a closer look at each element.
The decision element (A) checks the power status of the VM. If it is powered on, it will move to the scripting element (E). If the VM is not powered on, it will go to the startVM action (B). We have used this action before, and you may remember that its output is of the type VC:Task. The workflow (C) checks whether the VM is powered on and automatically answers vCenter questions, if there are any.
The last action (D) will wait for the VMware tools inside the VM to start.
This workflow is very good. However, if the VM has no operating system or VMware tools are not installed, it will show an error. So, we will modify it, as follows:
If you want to, you can now replace the startVM action in the workflow that you created.