Before you begin shutting down the virtual infrastructure 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 sfo-w01-vc01.sfo.rainpole.io -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 -NoTypeInformationThe C:\VMToHostMapping.csv file, containing the virtual machines to hosts mapping, is created