To help customers inventory their existing vSphere and vSAN CPU core usage for the vSphere+ and vSAN+ Cloud Service, you can take advantage of this inventory script HERE that I have created and generates a report (including CSV) by connecting to your existing vCenter Server(s) for analysis.
While the majority of our customers use vCenter Server to manage their ESXi host(s), we do have customers that run standalone ESXi hosts for various reasons. Recently, I had a few inquires on how customers could inventory their standalone ESXi hosts as they plan to transition those standalone ESXi hosts into the vSphere+ Cloud Service?
The benefit of using the vSphere API in creating the initial script is that the exact same API model also applies to a standalone ESXi host, so the core logic was there but a small modification of the script was required as we now have individual ESXi hosts that we need to connect and inventory. In addition, I also wanted to make the user experience as easy as possible to run the script and require as little input as possible.
The solution is a new PowerCLI function that takes in a simple text file that is delimited by a comma with each line containing the following:
- ESXi Hostname/IP Address
- ESXi Uesrname (does not require root and can even be read-only account)
- ESXi Password
The script will then read the file and connect to each host using Connect-VIServer cmdlet and leverage the exact same code from the original script to inventory the CPU core usage and output either to the console and/or to CSV file.
Step 1 - Install the script from PSGallery by running the following command:
Step 2 - We now need to "source" the script which is saved into your local home directory under .local/share/powershell/Scripts
Once you have created your host text file (which can be named anything), we simply pass it to the Get-StandalonevSpherePlusCPUSocketToCoreUsage function as show in the example below:
Get-StandalonevSpherePlusCPUSocketToCoreUsage -InputFile host.txt
Here is an example output which connects to 3 standalone ESXi hosts and produces the following output:
If you prefer to save the output to CSV file, you can run the following:
Get-StandalonevSpherePlusCPUSocketToCoreUsage -InputFile host.txt -Csv
Thanks for the comment!