With the addition of the new PowerShell module VMware.CloudFoundation.Reporting, it’s now easier than ever to create custom reports to prepare for an upcoming VCF upgrade or to provide to members of your infrastructure group. There are a lot more functions built into this module but for the sake of this post I will be focusing on the included reports that are available.
This Module is not officially supported by VMware
- What won’t be covered
- What you’ll need to get started
- Built-In Reports
- Overview Report
- Health Report
- Alert Report
- Password Policy Report
- Configuration Report
- Upgrade Precheck Report
- Troubleshooting
What won’t be covered
- Installation of the foundational components in the next section. Quick Google search should be able to assist.
What you’ll need to get started
I recommend utilizing the -RequiredVersion parameter when installing the PowerShell modules to verify you’re using the correct versions that were I’ve tested with.
- VMware Cloud Foundation 4.2.1+
- Windows 10+, Windows Server 2019+ or MacOS Monterey+
- PowerShell 5.1+ w/ following modules
- VMware.PowerCLI 12.7+
- VMware.vSphere.SsoAdmin 1.3.8+
- PowerVCF 2.2.0+
- PowerValidatedSolutions 1.10.0+
- VMware.CloudFoundation.Reporting 1.0.5.1002
- GitHub: https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting
- PS Gallery: https://www.powershellgallery.com/packages/VMware.CloudFoundation.Reporting/1.0.5.1002
- Administrator SSO credentials & SDDC Mgr’s Root credentials
Built-In Reports
- Overview Report
- Health Report
- Alert Report
- Password Policy Report
- Configuration Report
- Upgrade Precheck Report
To assist with the preceding reports, I recommend setting these variables ahead of time to avoid having to put them in every time. Plus they come in handy if you’re creating a script but I would avoid putting any passwords in scripts. For the below structure, replace the portion between and including the carrot brackets (ex. “<SDDC Mgr. FQDN>” will become “sddcmanager01.rainpole.local”). These variables can be renamed to what you want as well, what I used is what I prefer.
$sddcManagerfqdn = "<SDDC Mgr. FQDN>"
$sddcManagerUser = "<your SSO admin username>"
$sddcManagerPW = "<your SSO admin password>"
$sddcManagerRootPW = "<your SDDC Mgr. root password>"
$reportLoc = "<location of where you want the reports to go to>"
Each report will generate a PDF & Log file. The log file can be a nice to have if issues arise from running the actual report you can find out why and try to resolve it. At this point, the reporting module is not supported so please do not contact support if you have issues with it. Keep in mind these are just reports and are not making any changes to your environment. They are informational only.
Overview Report
The Overview Report will provide a system level view of your VCF environment. Including VCF, vCenter, & NSX versions. A count of your hosts, clusters, & VMs. Along with any enabled VVS you have deployed.
Sample:
Command structure:
Invoke-VcfOverview Report -sddcManagerFqdn $sddcManagerfqdn -sddcManagerUser $sddcManagerUser -sddcManagerPass $sddcManagerPW -reportPath $reportloc
Note:
You can anonymize the FQDNs & Names with random UUID’s by adding a -anonymized at the end of the command structure.
Health Report
The Health Report command runs the SOS health check utility along with additional health checks not available to in earlier versions of VCF.
Sample:
Command structure:
Invoke-VcfHealthReport -sddcManagerFqdn $sddcManagerFqdn -sddcManagerUser $sddcManagerUser -sddcManagerPass $sddcManagerPW -reportPath $reportloc -allDomains -failureOnly
Note:
To retrieve a health report on a specific Workload Domain you can tag -workloadDomain “your workload domain name” at the end of the command structure.
Alert Report
The Alert Report command collects system alert information that is currently active within the VMware Cloud Foundation environment. This report reduces the need to log into each of the VCF components to collect system alerts.
Sample:
Command structure:
Invoke-VcfAlertReport -sddcManagerFqdn $sddcManagerFqdn -sddcManagerUser $sddcManagerUser -sddcManagerPass $sddcManagerPW -reportPath $reportloc -allDomains -failureOnly
Note:
To retrieve an alert report on a specific Workload Domain you can tag -workloadDomain “your workload domain name” at the end of the command structure.
Password Policy Report
The Password Policy report generates the current password policy within the VMware Cloud Foundation environment & the underlying components. This reduces the time it takes logging into each individual components to collect this data manually.
Sample:
Command structure:
Invoke-VcfPasswordPolicy -sddcManagerFqdn $sddcManagerFqdn -sddcManagerUser $sddcManagerUser -sddcManagerPass $sddcManagerPW -reportPath $reportloc -allDomains
Note:
To retrieve a Password Policy report for a specific Workload Domain you can tag -workloadDomain “your workload domain name” at the end of the command structure.
Configuration Report
The Configuration Report collects configuration settings within VMware Cloud Foundation and its underlying components.
Sample:
Command structure:
Invoke-VcfConfigReport -sddcManagerFqdn $sddcManagerFqdn -sddcManagerUser $sddcManagerUser -sddcManagerPass $sddcManagerPW -reportPath $reportloc -allDomains
Note:
To retrieve a Password Policy report for a specific Workload Domain you can tag -workloadDomain “your workload domain name” at the end of the command structure.
Upgrade Precheck Report
This Upgrade Precheck report uses the REST API to run the built-in prechecks. This reduces the time it takes to run the prechecks manually via the SDDC Manager UI.
Sample:
Command structure:
Invoke-VcfUpgradePrecheckReport -sddcManagerFqdn $sddcManagerFqdn -sddcManagerUser $sddcManagerUser -sddcManagerPass $sddcManagerPW -reportPath $reportloc -workloadDomain "workload domain name"
Note:
Substitute “workload domain name” with either custom variables or the actual workload domain name.
Troubleshooting
- Reports are missing the correct formatting and not being displayed correctly in the browser.
- Close your PowerShell session, relaunch PowerShell, and re-run the report command.
- Running a report errors due to ‘Test-VCFAuthentication’ failing to generate a token.
- Close your PowerShell session, relaunch PowerShell, and re-run the report command.