WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Automating subscription and usage retrieval for vSphere+ and vSAN+ Cloud Service

Automating subscription and usage retrieval for vSphere+ and vSAN+ Cloud Service

02.09.2023 by William Lam // 2 Comments

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:

Install-Module VMware.Community.VPlus

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:

Import-Module VMware.Community.VPlus

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.

More from my site

  • Frequently asked scenarios about Subscription & Entitlement for vSphere+, vSAN+ and VCF+
  • Frequently asked scenarios about Global Inventory for vSphere+, vSAN+ and VCF+
  • Frequently asked scenarios about Cloud Consumption Interface (CCI) for vSphere+, vSAN+ and VCF+
  • Frequently asked scenarios about VM Provisioning & Management for vSphere+, vSAN+ and VCF+
  • Frequently asked scenarios about vCenter Lifecycle Management for vSphere+, vSAN+ and VCF+

Categories // Automation, VMware Cloud, VSAN, vSphere Tags // VMware Cloud, VSAN, vSphere

Comments

  1. *protectedGBMaryland says

    02/15/2023 at 4:40 am

    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.)

    Reply
    • William Lam says

      02/15/2023 at 5:05 am

      What is VCP in this context?

      Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...