As a follow-up from my earlier blog post which helps customers inventory their current on-premises vSphere/vSAN CPU usage for use with vSphere+, vSAN+ and VCF+ Cloud Services, this post will focus on how customers can easily inventory their vSphere+ and vSAN+ subscription usage, both manually and through some automation.
Once your on-premises vCenter Server has been converted into a subscription, all usage and billing information is now managed through the VMware Cloud Console (vmc.vmware.com), rather than the License section of the vSphere UI. In fact, you will find that the vSphere UI will be updated to include a new Subscriptions tab which provides a direct link to both the vSphere+ and vSAN+ Cloud Service.
To view your current vSphere+ and vSAN+ subscription commitments, navigate to the Subscriptions tab as shown in the screenshot below.
Here you will get a summary of all the subscriptions along with the amount of CPU cores that you have purchased for both vSphere+ and/or vSAN+ Cloud Service including the terms and other useful pieces of information.
To view your current vSphere+ and vSAN+ usage, navigate to the Subscription Usage tab as shown in the screenshot below.
Here you will get a summary of the overall total vSphere+ and vSAN+ CPU core usage and below that information, individual break down for each vCenter Server and its respective vSphere+ and vSAN+ core consumption.
As you can see, all of your vSphere+ and vSAN+ subscription and usage information can easily be viewed from within the VMware Cloud Console, but what if you wanted to retrieve this information periodically using automation? While there is currently not anAPI for the vSphere+ and vSAN+ Cloud Service, we can interact with the VMware Cloud Console by using the public Cloud Services Platform (CSP) API and a valid refresh token that contains the appropriate permissions to extract information from both the subscriptions and usage pages from within the VMware Cloud Console for automation purposes.
To demonstrate the same functionality as shown above from an automation perspective, I have created a simple PowerShell module called VMware.Community.VPlus, which can be used to retrieve both the subscription and usage information for both the vSphere+ and vSAN+ Cloud Service.
Step 1 - Install the PowerShell module from the PowerShell Gallery by running the following command:
Step 2 - Generate a CSP Refresh Token with CloudAdmin access for vSphere+ and vSAN+ Cloud Service. You can refer to the VMware Cloud documentation for detailed instructions.
Step 3 - Import the module by running the following command:
Step 4 - Connect to the service using Connect-VPlus function and provide the CSP Refresh Token (from Step 2) and the Organizational ID (you can copy that in upper right hand corner of the VMware Cloud Console) that has the vSphere+/vSAN+ service enabled
Connect-VPlus -RefreshToken $REFRESH_TOKEN -OrgID $ORG_ID
To view vSphere+ and vSAN+ subscriptions, use the Get-VPlusSubscription function as shown in screenshot below:
You can also filter out a specific subscriptions by using the -SubscriptionId parameter.
To view vSphere+ and vSAN+ usage, use the Get-VPlusDeployment function as shown in screenshot below:
You can also filter out a specific deployments by using the -DeploymentId parameter.
Curiously, what happens if you have a disconnected private cloud? Does that mean you'll need to use VCP going forward? When I was part of VMware working for the NS Team out of Reston, we had a lot of customers that were not and never would be connected to the internet... (The team that did the VCP appliance development seemed to have a hard time with that concept.)
William Lam says
What is VCP in this context?