Lab: Configuration Drift Detection & STIG Compliance
Objectives
- Create a VCF Operations configuration template from a source vCenter and assign it through a policy
- Detect configuration drift of vCenter instances and vSphere clusters with Fleet Management > Configuration Drifts
- Implement STIG compliance checks for DoD/regulated environments (host-level controls via esxcli and TLS profiles)
- Report drift with the Drift Status Report and alert on it
- Remediate drift manually in vCenter and reconcile the template where the new value is intended
Prerequisites
VCF 9.0 with VCF Operations managing the vCenter instance (cloud account registered to a cloud proxy), a user holding the Configuration Drifts Manage privilege, at least 2 hosts in a cluster
Prior labs: vcap-admin-01
Required skills:
- ESXi advanced settings and esxcli
- VCF Operations fleet management navigation
- Security compliance concepts (STIG/CIS)
Lab Environment
VCF 9.0 management domain with VCF Operations (fleet management) and its cloud proxy registered to the vCenter instance(s); the vCenter is version 9.0 or later (Configuration Drifts applies only to 9.0+ vCenter instances and vSphere clusters). 2+ ESXi hosts in a cluster with vSphere Configuration Profiles available. One vCenter/cluster setting is changed intentionally to demonstrate drift.
Tasks
Task 1 Drift Detection, STIG Compliance & Remediation
Build a complete configuration-compliance workflow in VCF 9.0: capture a desired state as a VCF Operations configuration template, assign it by policy, introduce and detect drift on the vCenter/cluster, assess host-level STIG controls, remediate, and report — the operational process for keeping configurations consistent at scale.
Create the configuration template. VCF Operations → Fleet Management → Configuration Drifts → Configuration Templates → Create Config Template. Name='mgmt-vcenter-baseline', description. Template Setup: select the management vCenter as the Configuration Source and extract its settings; on the next tab review/select the configuration categories to include; on Assign vCenters using Policy select the VCF Operations policy that covers the management vCenter (or assign later under Infrastructure Operations → Configurations → Policy Definition → policy → Configuration Templates → Edit → select template → Activated → Save). Review and Create.
Introduce intentional drift. On the management vCenter change two settings that the template captured — for example a vCenter advanced setting (vSphere Client → vCenter → Configure → Advanced Settings → edit a logged option such as config.log.level) and a cluster setting (Cluster → Configure → vSphere DRS → automation level). Keep the host-level changes of the STIG step separate; they are not tracked by Configuration Drifts.
Detect the drift. VCF Operations → Fleet Management → Configuration Drifts (Overview). Read the Configuration Enabled Objects Summary bar (vCenter 9.0+ instances with a template attached, plus clusters with Configuration Profiles enabled) and the vCenter Instances Drift Status / Cluster Drift Status charts. Select the management vCenter and click Detect Drift; the Drifts table fills across all templates. Click the vCenter, select 'mgmt-vcenter-baseline': the right pane lists Current vCenter Value versus Config Template Value for each drifted setting (or 'No drift found for this Config Template since last configuration drift check').
Report and schedule. On the Drifts Details page select the vCenter and click Download Drift Status Report — the Config Drift Report lists date, resource, template and drift status (last 7 days by default; up to 30 days via Global Settings). Then schedule detection: create an automation job for drift detection in Automation Central so Detect Drift runs on a cadence instead of on demand.
STIG compliance assessment. Apply a STIG compliance profile: either import a VMware-published STIG baseline (available from public.cyber.mil for vSphere) or manually check key STIG controls: CAT I: (a) TLS 1.2 minimum (esxcli system tls server get # ESXi 8.0 U3+); (b) No unauthorized root access. CAT II: (c) SSH disabled; (d) Lockdown mode enabled; (e) Persistent logging configured; (f) SNMP v3 only. CAT III: (g) DCUI timeout < 600s; (h) Shell timeout < 600s. Document findings as a compliance report.
Remediate the drift. Remediation is not performed from the VCF Operations console: log in to vCenter and revert the two settings to the template values, then run Detect Drift again — the template shows no drift. Where a drifted value is the intended new state, do the reverse: edit the template under Configuration Drifts → Configuration Templates to match the current configuration. For the host-level STIG findings use esxcli on each host (or a vSphere Configuration Profile at cluster level) rather than Host Profiles.
Automate drift detection alerting. VCF Operations → create alert definition: 'Configuration-Drift-Detected'. Symptom: compliance score < 100% (or specific configuration properties changed). Notification: email to security-ops@lab.local. This ensures drift is detected and reported immediately, not discovered during quarterly audits.
Handle legitimate exceptions. A setting that must legitimately differ on one vCenter or cluster (for example a different DRS automation level on a GPU cluster) should not sit in a template shared with that object: either give the object its own template through a separate policy, or remove that setting from the shared template so that it is not reported as drift. Record the exception and its business justification in the design; VCF Operations has no per-object exclusion tag for Configuration Drifts.
Generate compliance report. VCF Operations → Reports → create template: 'Monthly-Compliance-Report'. Sections: (a) Executive summary: overall compliance score, trend, critical deviations; (b) STIG compliance: CAT I/II/III pass rates; (c) Drift details: per-host deviation list with remediation status; (d) Exceptions: documented legitimate deviations with business justification. Schedule: Monthly. Format: PDF. Distribution: security-team + audit-committee.
Continuous compliance process. Design the ongoing workflow: (1) Weekly: automated drift scan via VCF Operations; (2) Real-time: drift alert notifications to security ops; (3) Monthly: compliance report to management; (4) Quarterly: baseline review and update (new security patches may require baseline changes); (5) Annual: full STIG/CIS audit with external assessor. Document this process as a compliance operations runbook.
Validation Gate
Check: Compliance management workflow operational from baseline to reporting
Expected: Configuration template created and policy-assigned, intentional vCenter/cluster drift detected with current vs template values, STIG host controls assessed, drift remediated in vCenter and confirmed by a clean Detect Drift, Drift Status Report downloaded and detection scheduled, exceptions documented
Common Errors
Final Validation
Configuration compliance management operational with drift detection, STIG assessment, and automated reporting
✓ Template defined → Configuration template extracted from the source vCenter and assigned via a VCF Operations policy
✓ Drift detection → Detect Drift lists each changed setting with Current vCenter Value and Config Template Value
✓ STIG compliance → CAT I/II/III findings documented with pass/fail status
✓ Remediation → Settings reverted in vCenter (or template edited); Detect Drift reports no drift
✓ Reporting → Drift Status Report downloaded; drift-detection job scheduled in Automation Central
Cleanup / Restore
• Remediate all intentional drift on test host
• Verify Detect Drift shows no drift for the template
• Keep compliance dashboard and reporting for ongoing use
Design Reflection (VCDX)
Compliance management is a VCDX differentiator for regulated environments. Key points: (1) proactive drift detection vs reactive audit findings; (2) exception management with documented business justification; (3) STIG/CIS alignment for government/financial sector deployments; (4) automated reporting reduces audit preparation burden.
Requirements
- 100% compliance on CAT I STIG controls
- Weekly drift detection with real-time alerting
- Monthly compliance reports for audit committee
Constraints
- Configuration Drifts covers vCenter 9.0+ instances and vSphere clusters only; remediation is manual in vCenter
- Each vCenter needs exactly one active policy carrying the template; the user needs the Manage privilege
- STIG controls may conflict with VCF operational requirements
Assumptions
- The source vCenter used for the template represents the desired production state
- Legitimate exceptions are documented before drift detection is enabled
- Security team reviews and acts on drift alerts within 24 hours
Risks
- Undocumented exceptions generate false positive alerts — erodes trust in compliance system
- Remediation of VCF-managed settings breaks lifecycle operations
- Compliance score regression after VCF upgrades if baseline is not updated
Self-Assessment Discussion Prompts
- How do you handle drift that is introduced by VCF lifecycle operations?
- What compensating controls do you implement for STIG exceptions required by VCF?
- How would you scale compliance management from 10 to 1,000 ESXi hosts?
Extensions
Import the DoD vSphere STIG baseline from public.cyber.mil and run a full assessment
Automate drift remediation using PowerCLI scripts triggered by VCF Operations alerts
Build a multi-cluster compliance comparison dashboard
⚠ Known Pitfalls
References
- VCF 9.0 documentation — Managing your Environment Configurations (Configuration Drifts), Managing Configuration Templates in VCF Operations, Using the Configuration Drifts Overview Page, Configuration Drifts FAQ: https://techdocs.broadcom.com/us/en/vmware-cis/vcf/vcf-9-0-and-later/9-0.html
- DISA vSphere STIG: public.cyber.mil
- CIS ESXi Benchmark: cisecurity.org