Academy/vSphere Foundation 9.0 Support (2V0-18.25)/Lab: Create and Execute Orchestrator Workflow for Automated Log Collection
This lab targets VCF 9.0

Lab: Create and Execute Orchestrator Workflow for Automated Log Collection

VCF 9.0Advancedvcp-foundation⏱ 75 min

Covers Obj 5.9 (VCF Operations Orchestrator — configuration, workflows, scheduling). Build automated workflow for support operations.

Objectives

  • Configure VCF Operations Orchestrator and connect to vCenter
  • Browse and run pre-built workflows from the workflow library
  • Create a custom workflow for automated log collection across hosts
  • Schedule workflow execution for recurring support tasks
  • Run a workflow from a VCF Operations alert through the Management Pack for Orchestrator

Prerequisites

VVF lab with the VCF Operations orchestrator appliance deployed from its OVA (4 vCPU, 12 GB memory, 200 GB disk) and authenticated against vCenter (vracli vro authentication set -p vsphere). vCenter operational.

Prior labs: vvf-support-12

Required skills:

  • VCF Operations UI basics
  • Basic scripting concepts
  • vCenter administration

Lab Environment

Holodeck vSphere Foundation 9.0 instance (New-HoloDeckInstance -VVF) with VCF Operations, plus a standalone VCF Operations orchestrator appliance deployed from its OVA (4 vCPU / 12 GB / 200 GB) with vSphere as the authentication provider.

Credentials

SystemUsernamePassword
Orchestratormember of the Orchestrator admin group (vSphere SSO)Set during deployment
vCenteradministrator@vsphere.localHolodeck documented default (Post Deployment table)
VCF OperationsadminHolodeck documented default (Post Deployment table)

Tasks

Task 1 Configure Orchestrator and Explore Pre-Built Workflows

manageability

Orchestrator automates repetitive support tasks. Understanding configuration and the pre-built workflow library is foundational for Obj 5.9.

Step 1

Open the VCF Operations orchestrator client at https://<orchestrator-fqdn> and log in as a member of the Orchestrator administrative group (a vSphere SSO group). On the appliance as root, confirm the authentication provider: vracli vro authentication (should report vsphere). Health: curl -k https://<orchestrator-fqdn>/vco/api/healthstatus.

Client loads; authentication provider is vsphere; healthstatus returns RUNNING.
Step 2

If the vCenter inventory is not yet registered: Library → Workflows → search 'add a vcenter' → run 'Add a vCenter Server instance' (vSphere plug-in). Enter the vCenter FQDN, connection properties and credentials, accept the certificate.

Workflow run completes; the vCenter inventory appears under the vSphere plug-in in the Inventory view.
Step 3

Browse the workflow library: Library → Workflows → browse the folder tree (Library/vCenter and others). Note the pre-built workflows available.

Library shows categorized workflows. vSphere category includes: Create VM, Clone VM, Snapshot management, Host maintenance.
Step 4

Run a pre-built workflow: Select 'Create a snapshot for all VMs in a resource pool' → Run. Select target resource pool. Set snapshot name and description.

Workflow executes. Activity → Workflow Runs shows progress. Snapshots created on all VMs in the selected resource pool.
Step 5

Review workflow execution history: Activity → Workflow Runs → select the completed run. Review: start time, duration, status (completed/failed), input/output parameters, logs; nested workflow runs appear in a tree view.

Execution details show step-by-step progress with timestamps and results.

Validation Gate

Check: Orchestrator configured, pre-built workflow executed successfully

Expected: vCenter endpoint connected. Snapshot workflow completed. Execution history recorded.

Common Errors

vCenter endpoint shows 'Disconnected'
Cause: Credentials expired or vCenter certificate changed
Fix: Edit endpoint → update credentials → re-accept certificate → Save.
Workflow fails with 'Permission denied'
Cause: Orchestrator service account lacks required vCenter permissions
Fix: Verify Orchestrator service account has Administrator role on vCenter. Check vCenter → Administration → Global Permissions.
Logins fail or the Orchestrator service account in vCenter is missing
Cause: The authentication provider is not set, or was reset
Fix: On the appliance as root, check with vracli vro authentication and set it again with vracli vro authentication set -p vsphere ... (VCF 9.0.1 docs p.1310); this is also the documented remediation for the Orchestrator service account in vCenter (p.2938).

Task 2 Create Custom Workflow for Automated Log Collection

manageability

Custom workflows automate repetitive support tasks. Building a log collection workflow demonstrates Orchestrator's scripting and action chaining capabilities.

Step 1

Library → Workflows → New Workflow. Name: 'Automated ESXi Log Collection'. Description: 'Collects support bundles from all ESXi hosts in a cluster and stores in central location.'

Step 2

Define input parameters: Add parameter 'targetCluster' (type: VC:ClusterComputeResource) — this lets the operator select which cluster to collect logs from.

Input parameter defined with vCenter cluster object type.
Step 3

Add workflow elements in sequence: (1) 'Get hosts in cluster' action — retrieves all ESXi hosts from targetCluster. (2) For-each loop over hosts. (3) Inside loop: 'Run SSH command' action — executes 'vm-support -w /vmfs/volumes/<datastore>/bundles' on each host (the documented ESX bundle command, VCF 9.0.1 docs p.1780; -w writes to a datastore directory instead of /tmp).

The workflow designer uses drag-and-drop for actions. Each action has input/output bindings that connect them in sequence.
Step 4

Add error handling: Wrap the SSH command in a try-catch block. On failure, log the error and continue to next host (don't stop the entire workflow for one host failure).

Error handling configured. Workflow continues processing remaining hosts if one fails.
Step 5

Add final action: 'Send email notification' — sends summary email listing which hosts succeeded and which failed. Configure SMTP settings if not already done.

In Holodeck without SMTP, this step can be replaced with a 'Log message' action that writes results to Orchestrator logs.
Step 6

Validate and save workflow. Click 'Validate' to check for binding errors or missing connections. Fix any validation warnings.

Workflow validates successfully. No binding errors.
Step 7

Test run: Execute workflow → select target cluster → monitor execution in Runs tab.

Workflow executes across all hosts. Support bundles generated on each host.

Validation Gate

Check: Custom workflow created, validated, and executed successfully

Expected: Workflow runs against cluster. Log collection completes on all hosts (or gracefully handles failures).

Common Errors

Workflow validation fails — 'Unbound input parameter'
Cause: Action input not connected to previous action output or workflow input
Fix: Check each action's input bindings in the workflow designer. Ensure targetCluster flows to 'Get hosts' action input.
SSH command fails — 'Connection refused'
Cause: ESXi SSH service not running or firewall blocking port 22
Fix: Enable SSH on target hosts: vCenter → Host → Configure → System → Services → SSH → Start.

Task 3 Schedule Workflow and Configure Event Triggers

manageability

Scheduling and event-based triggers turn manual workflows into automated operations — key for proactive support and exam Obj 5.9.

Step 1

Schedule the log collection workflow: Library → Workflows → select 'Automated ESXi Log Collection' → Schedule. Set: Daily at 02:00 UTC, target cluster pre-selected.

Scheduled task created. Shows under Activity → Scheduled.
Step 2

Connect alerts to the workflow from the VCF Operations side (VCF 9.0.1 docs p.4538): install and configure the Management Pack for Orchestrator in VCF Operations (Administration > Integrations) against this Orchestrator, make sure the same vCenter is known to both, map the log-collection workflow to the Host System object type as an action, then map it to a host alert through a recommendation so the alert shows a Run Action button.

Event-based triggers enable automated remediation. Example: critical alert → auto-collect logs → notify support team. Reduces response time.
Step 3

Review the mapping: the workflow appears as an action on Host System objects, and the host alert's recommendation offers it with the affected host as input.

Action mapped to the object type and to the alert recommendation.
Step 4

Test: raise a host alert in VCF Operations (lab only), open it and use Run Action; confirm the workflow run under Activity → Workflow Runs in Orchestrator.

In Holodeck, generate a test alert by temporarily disconnecting a host's vSAN VMkernel — this triggers a vSAN health critical alert.
Step 5

Document automation patterns: List 3 common support scenarios that benefit from Orchestrator automation: (1) Proactive log collection on alert, (2) Scheduled compliance checks, (3) Automated VM snapshot cleanup (delete snapshots >7 days old).

Validation Gate

Check: Workflow scheduled, event trigger configured, automation patterns documented

Expected: Scheduled task visible. Policy trigger configured. Three automation use cases documented.

Common Errors

Scheduled task not executing at configured time
Cause: Known VCF 9.0 issue: on a standalone Orchestrator using VCF SSO, scheduled workflows stop running 30-60 minutes after the scheduling user leaves the client (VCF 9.0.1 docs p.283, no workaround); otherwise a wrong start time, recurrence or Orchestrator timezone
Fix: Check whether the deployment uses VCF SSO (known issue); otherwise verify the start time, recurrence and Orchestrator timezone and re-create the schedule.
Run Action from the alert starts the workflow but it fails
Cause: The workflow's input is not mapped to the alert's object
Fix: Re-check the action mapping in the Management Pack for Orchestrator so the affected host is passed as the workflow input.

Final Validation

Orchestrator configured, custom workflow created and tested, scheduling and event triggers operational

✓ Orchestrator connected to vCenter → Endpoint shows 'Connected'

✓ Pre-built workflow executed → Snapshot workflow completed successfully

✓ Custom log collection workflow works → Support bundles generated on target hosts

✓ Schedule configured → Daily schedule visible in Scheduled Tasks

✓ Event trigger configured → Policy with critical alert trigger and workflow action

Cleanup / Restore

• Disable scheduled tasks if not needed for ongoing lab use

• Delete test snapshots created by pre-built workflow

• Remove event trigger policies to prevent unintended workflow execution

Design Reflection (VCDX)

Orchestrator transforms reactive support into proactive operations. Architects should design automation runbooks that cover the top-10 support scenarios, reducing human intervention and MTTR.

Requirements

  • Automate log collection across all cluster hosts
  • Event-driven response to critical alerts

Constraints

  • SSH must be enabled on target hosts (security consideration)
  • Orchestrator needs sufficient resources for concurrent workflow execution

Assumptions

  • vCenter endpoint credentials remain valid
  • SMTP configured for email notifications (optional in lab)

Risks

  • Overly aggressive event triggers can cause workflow storms — implement cooldown periods
  • SSH access to ESXi hosts creates security surface — restrict to Orchestrator service account only

Self-Assessment Discussion Prompts

  1. What safeguards prevent an event trigger from creating an infinite loop of workflow executions?
  2. How would you design an Orchestrator workflow for automated host remediation (vLCM patch + reboot)?
  3. What are the security implications of Orchestrator having SSH access to all ESXi hosts?

Extensions

Create a workflow that generates a weekly vSAN health report and emails it to the ops team

Build an automated snapshot cleanup workflow that deletes snapshots older than 7 days

Integrate Orchestrator with a ticketing system (ServiceNow) to auto-create incidents on critical alerts

Create a multi-step remediation workflow: detect disk failure → evacuate data → create support ticket

⚠ Known Pitfalls

Orchestrator workflows run with the service account permissions — ensure account has required roles on all target objects
Event triggers without cooldown/throttling can cause workflow storms during major incidents (e.g., network partition triggers alerts on every host simultaneously)
Custom workflows should always include error handling — a single host failure should not abort the entire workflow

References

Was this page useful?
Type to search. ↑ ↓ to move, Enter to open, Esc to close.