Before you begin shutting down the vSphere with Tanzu workload domain, you get a mapping between virtual machines in the workload domain and the ESXi hosts on which they are deployed. You later use this mapping to log in to specific ESXi hosts and shut specific management virtual machines down.
- Start Windows PowerShell.
- Connect to the vSphere with Tanzu workload domain vCenter Server by running the command.
Connect-VIServer -Server <workload_domain_vCenter_server_name> -User email@example.com -Password vsphere_admin_password
- Generate the virtual machine to host mapping by running the command.
Get-VM | Select Name,VMHost | Export-Csv -Path C:\VMToHostMapping.csv -NoTypeInformation
The C:\VMToHostMapping.csv file, containing the virtual machines to hosts mapping, is created.