• No results found

Creating a Workflow to Power on a Virtual Machine

In document Cisco UCS Director 5.2 lab (Page 33-55)

Cisco UCS Director 5.2 Lab Part 2 Step 49: Navigate to Policies -> Orchestration.

Cisco UCS Director 5.2 Lab Part 2

Step 51: Specify the following in the Add Workflow Details form:

Workflow name: Power On a VM

Description: Workflow to Power on a VM

Under “Save Options”

Place in New Folder: Check the box

Folder Name: Training

Cisco UCS Director 5.2 Lab Part 2

Step 52: The next form is Add User Inputs. This panel allows us to specify custom input parameters to the workflow. We will not be using this capability. Click Next.

Cisco UCS Director 5.2 Lab Part 2

Step 53: The next form is Add User Outputs. This panel allows us to specify custom output parameters to the workflow. We will not be using this capability. Click

Submit.

Cisco UCS Director 5.2 Lab Part 2

Step 55: You should still be at Policies -> Orchestration. If not, navigate there.

Step 56: Expand the Training folder in the left pane, then double-click on the workflow to open the Workflow Designer.

Note: You might see the status of the workflow to be Failed or Not Validated. This is because there are no tasks

Cisco UCS Director 5.2 Lab Part 2

The Workflow Designer is used to build the individual tasks comprising the workflow, and to join the individual tasks into a specific sequence. Each task completes with a status of Success or Failed, and subsequent tasks can be initiated for both outcomes. If a task is the last task in the flow, it is connected to terminals which will terminate the workflow with either a success for failed status.

The Workflow Designer has two sections:

Available Tasks: Shows a list of pre-defined or custom tasks Design Area: Active work area used to create workflows

In the Available Tasks pane on the left hand side, there is a search function that allows you to search for specific tasks. To search for a task, start typing the task name in the entry window at the top of the Available Tasks pane. As you type, all tasks that contain the entered word sequence in any part of their name will be displayed. To use a task, click on the task and drag it into the Design Area.

Cisco UCS Director 5.2 Lab Part 2

Step 57: Start typing “VM Power” in the search box. Note that all task names that contain the phrase “VM Power” are displayed. Select the task VM Power

Action under the Cloupia Tasks -> Generic VM Tasks path and drag it into the Design Area.

The Add Task dialog box appears as soon as the task is dragged into the Design Area. Each task generally has at least four configuration screens associated with it:

Screen Function Task Information Enter Task Name , Type, Category and other general task info Task Input Mapping Specifies where task should get its input values (eg from the

output of previous tasks, or from the user that initiates the task)

Task Inputs Manually specifies task input values that will not be obtained from Task Input

Mapping Screen

User Output Mapping Maps output values from the task into objects that can be used as input to subsequent tasks

Cisco UCS Director 5.2 Lab Part 2

Step 58: Change the Task Name to VM Power Action. It’s a good practice to change the task name instead of leaving it at the default value.

Cisco UCS Director 5.2 Lab Part 2

Step 59: If you had added input fields to this workflow, you could map them to the expected inputs of the task.

As you did not create any input fields for this workflow this page will not be modified, click Next on this screen.

Cisco UCS Director 5.2 Lab Part 2

Step 60: Click on the Select VM select button to display a list of available VMs.

Step 61: Click the box for Cloud= VCenter-2, Instance Name= CUCSD-P2-Windows-7 (you will have to horizontally expand the Instance Name column to see the entire name) and then click Select.

Cisco UCS Director 5.2 Lab Part 2

Step 62: Verify that CUCSD-P2-Windows-7 is the selected VM and that the VM Action is

Power ON and click Next.

Step 63: You did not create any output parameters for the workflow so just click

Cisco UCS Director 5.2 Lab Part 2 Step 64: Click OK.

Step 65: Notice that since this is the first (or only) task defined in this workflow, the

Success and Failed terminals are automatically connected to the task.

Cisco UCS Director 5.2 Lab Part 2

Step 66: You will now test the workflow, but before you execute the workflow, you will need to ensure that the VM Power State is OFF. To do this, navigate to

Virtual -> Compute.

Step 67: In the left pane select VCenter-2 (expand All Clouds if necessary). When the page refreshes, click on the VMs tab, and locate the CUCSD-P2-Windows-7 VM. If necessary right scroll to see the current Power State.

Cisco UCS Director 5.2 Lab Part 2

Step 68: If the Power State is ON, right-click on the selected VM and select Power OFF.

You will get a VM Task confirmation screen. Click Proceed.

Cisco UCS Director 5.2 Lab Part 2 Step 69: Verify that the VM power state is OFF.

Cisco UCS Director 5.2 Lab Part 2 Step 71: In the Workflows tab, expand the Training folder.

Cisco UCS Director 5.2 Lab Part 2

Step 73: Right-click on the workflow and select the Execute now option.

Cisco UCS Director 5.2 Lab Part 2

Step 75: Note that the Service Request is assigned an ID. This SR ID is used to identify a workflow instance. This is useful to identify a specific workflow if you have multiple workflow instances executing that have the same name.

Click on Show Detail Status.

Step 76: The status window displays the workflow progress. Note the Refresh button. Periodically click Refresh until the workflow completes.

Cisco UCS Director 5.2 Lab Part 2

Step 77: The Log tab displays workflow details and is useful for troubleshooting. Be sure to click Refresh prior to examining the log to get the latest info.

Cisco UCS Director 5.2 Lab Part 2 Step 79: Go to Virtual -> Compute.

Step 80: Select All Clouds -> vCenter-2. Click the VMs window and validate that the VM

Power State is ON.

It is always good practice to click Refresh to make sure the screen is updated.

If the VM still indicates OFF, see the next step. Otherwise you have completed

this section, proceed to Section 3.2: Creating a Workflow to Create a VLAN in

Cisco UCS Director 5.2 Lab Part 2

Step 81: If the VM Power State is still OFF, it is possible that the state of the VM has not yet been synched with UCS Director. In that case you should initiate an inventory collection, as it may take 15 minutes before the periodic inventory collection process updates the UCS Director database.

To request an inventory collection, navigate to Virtual->Compute. Then select

VCenter-2, and in the tab dropdown. Select the Polling tab, and then select Request Inventory Collection from the context menu.

Click Submit to start the collection process.

Cisco UCS Director 5.2 Lab Part 2

Wait a couple of minutes and recheck the Power State of the virtual machine using the procedure you did previously. It should now be ON.

In document Cisco UCS Director 5.2 lab (Page 33-55)

Related documents