Category Archives: VCF

Valid VMware License Types in Cloud Foundation (VCF) API

When I first start working with an API, I aim for low-hanging fruit. REST APIs, by nature, should be very generic in how they’re interacted with; however, there’s usually small nuances to take into consideration. For example, I recently found out that the VMware Cloud on AWS API uses a csp-auth-token header for authentication and authorization.

While authorization and authentication to the VCF API was straightforward (SDDC Manager username and password), I struggled the first time with POSTing a new VMware license due the API requiring a specific format for productType.

When I explored the API, I saw examples for NSXV and VCENTER but didn’t find other productTypes in the License Keys section (2.6).

Instead, the valid productTypes are only referenced in section 3.54.7 which is an example HTTP request:

{
  "description" : "string",
  "id" : "string",
  "isUnlimited" : true,
  "key" : "4M2VN-9RKEN-J80TU-0T222-98QP2",
  "licenseKeyUsage" : {
    "licenseUnit" : "One among: CPUPACKAGE, INSTANCE, VMS, CCU, PLU, DESKTOPVM, SERVERVM, VM, SERVER, CORES, CONCURRENTUSER, NAMEDUSER",
    "remaining" : 0,
    "total" : 0,
    "used" : 0
  },
  "licenseKeyValidity" : {
    "expiryDate" : {
      "epochSecond" : 0,
      "nano" : 0
    },
    "licenseKeyStatus" : "One among: EXPIRED, ACTIVE, NEVER_EXPIRES"
  },
  "productType" : "One among: VCENTER, VSAN, NSXV, SDDC_MANAGER, ESXI, VRA, VROPS, NSXT"
}

As you can see, the valid productTypes for license keys are:

  • VCENTER
  • VSAN
  • NSXV
  • NSXT
  • SDDC_MANAGER
  • ESXI
  • VRA
  • VROPS

I hope this information has been helpful if you’re trying to add license keys to VCF through the API. I am submitting feedback to product management to make this more prominent.

Automating VMware Cloud Foundation with PowerVCF

In a recent post, I wrote about interacting with VCF using the API to add a new license key as a simple way to begin familiarizing myself with the API. As a huge proponent of PowerShell, I began looking for a module to talk to the API but came up empty handed. I began working on a module with vSphere admins in mind because I know the important role PowerShell plays in day-to-day operations. During a conversation with Jase McCarty, he told me about the PowerVCF project which does exactly that! The module was initially developed and is maintained by Brian O’Connell and has 50 cmdlets which covers ~70% of the API calls in VCF 3.9.0:

  • Get/Commission/Decommission Host
  • Get/New/Set/Remove Workload Domain
  • Get/New/Set/Remove vSphere Cluster
  • Get/New/Remove Network Pool
  • Get/New/Remove Network IP Pool
  • Get/New/Remove License Keys
  • Get/Retry Tasks
  • Get/Set Credentials
  • Get/Set participation in CEIP
  • Get/Start Backup Configuration
  • Get/Request Log Bundle
  • Get/Set Microsoft Certificate Authority
  • Get/Request Certificate CSRs
  • Get/Request/Set Certificates
  • Get/Set Depot Credentials
  • Get PSCs & vCenter servers managed by SDDC Manager
  • Get NSX-V Managers
  • Get NSX-V/T Clusters
  • Get vRealize Log Insight info
  • Get vRealize Lifecycle Manager & Environment info
  • Get vROPS info

PowerVCF is also mostly compatible with VxRAIL too with the exception of commissioning and decommissioning hosts, working with network pools, and creating and removing workload domains.

The biggest functionality missing right now are creating and deleting PKS/Horizon workload domains and creating/joining/tearing down federations. I’m currently working on the PKS workload domain functions and plan to submit a PR soon!

If you’ve recently deployed VCF and looking to orchestrate functionality, I highly recommend checking this module out! If you enjoy creating PowerShell cmdlets and looking to contribute to a project, you’ll find quite a few opportunities to help us work towards feature parity!

Where’s My VMware Cloud Foundation License?

A common question I receive from customers is why they don’t see a VMware Cloud Foundation license in the MyVMware portal. What appears instead is licenses for each individual product that make up the VCF edition you purchased. Which is typically:

  • vSphere & vCenter
  • vSAN
  • NSX
  • SDDC Manager
  • vRealize Operations, Automation, and Log Insight
  • Horizon (optional)
  • Enterprise PKS (optional)

So how do you consume these licenses? Assuming you have the hardware in place and you’re ready to bring up VCF, the first step is to deploy Cloud Builder and download/complete the VCF deployment parameters worksheet. In the deployment parameter worksheet, you’ll enter license keys for the following components:

  • vSphere & vCenter
  • vSAN
  • NSX
  • vRealize Log Insight

The license keys should match with the version of VCF that you’re deploying. During bring-up, the license key audit only validates the format of the key, not the accuracy. See the Bill of Materials (BOM) in the VMware Cloud Foundation Release Notes for the specific product versions supported in each release.

With the management workload domain deployed, you’ll (optionally) enter the license keys for:

  • vRealize Automation; you can also use a vRealize Suite or vCloud Suite license key
  • vRealize Operations; you can also use a vRealize Suite or vCloud Suite license key
  • vRealize Log Insight
  • NSX-T
  • Horizon

To get started, select Licensing from the left navbar:

Which brings up the existing licenses that have been added (in the example below, I have a fully deployed SDDC):

Click the + LICENSE KEY and add each product key:

Now that licenses are added, you can create a new workload domain, add a host to a cluster, or add a cluster to a workload domain.

Announcing VMware Cloud Foundation 3.8

VMware Cloud Foundation 3.8 was released in July 2019 and the biggest news in this release is the addition of public RESTful APIs for common tasks that are performed for workload domains and other day 2 operations. Managing Cloud Foundation in the SDDC manager is incredibly intuitive but customers have significant investment in existing IT and business systems such as vRA or ServiceNow. 

In large scale cloud foundation deployments like I work with in Global Accounts, this will be a heavily used feature because customers now have the ability to utilize existing provisioning workflows in vRA or create new workflows that allow ops teams to orchestrate even higher levels of automation. Some common operational tasks that are available in version 1 of the API are:

  • Commission and decommission hosts
  • Create and delete workload domains
  • Scale clusters
  • Manage network pools

Cloud Foundation 3.8 also adds capability for the SDDC manager to patch and upgrade all vRealize Suite components and NSX-T. In previous versions, SDDC manager could deploy vRealize Suite but initial config, patching, and upgrades were handled manually through each individual component. The Cloud Foundation engineering teams has been rapidly deploying enhancements and this version comes just 6 weeks since the last major release.

For further details such as release notes and planning and upgrade guides for Cloud Foundation 3.8, visit VMware Docs.