Introducing the VCF.JSONGenerator PowerShell Module for VMware Cloud Foundation

If you’ve been about VMware Cloud Foundation at all, you’ve likely come across the VCF Planning & Preparation workbook developed and maintained by @cliffcahill and myself, dating as far back as 2019.

Its been a long time coming, but something that many have asked for is the ability to generate JSON payloads directly from the VCF Planning & Preparation workbook, ready for submission to the API endpoint responsible for the deployments in your VMware Cloud Foundation instance.

It’s with not a little pride that I introduce the VCF.JSONGenerator PowerShell module (supporting Windows, Mac OS and Linux) as something I have been working on over the past few months.

It’s a never ending project in reality. There will always be additions/changes/variations required, especially given the enormous amount of flexibility introduced in VCF 9.0, but its a good start, and something I will look to build on over time.

Available from the PowerShell Gallery, check it out here

It supports VCF 9.0 only, and leverages the latest VCF Planning & Preparation workbook which has seen a massive overhaul for this release. The scope of the VCF Planning & Preparation workbook has increased to beyond the initial management and workload domain deployments, and now allows you to plan for further Day-2 Operations, so the VCF JSON Generator does likewise.

When you load a P&P workbook into the generator, it automatically detects the operations and options chosen within the workbook, and enables/disables the available generation options accordingly.

We haven’t quite decided where to host the code just yet, but once we do, hopefully it will become easier to log issues and request enhancements

A quick snapshot of the README to get an idea of how it works and what it supports is embedded below

Give it a whirl and let us know what you think!

VCF.JSONGenerator

Author

Thank you for your interest in the project. Whether it’s a bug report, enhancement, correction, or additional documentation, I greatly value feedback and contributions from our community.

Name Role GitHub
Ken Gould Creator :fontawesome-brands-github:

Overview

VCF.JSONGenerator is provided as is, as a companion tool for the VCF 9.0 Planning & Preparation (P&P) workbook. Its intent is to help automate the task of creation JSON payloads for submission to the VCF management components.

Support Platforms

  • Windows (tested with Server 2022 Datacenter edition)
  • Ubuntu (tested with 24.02)
  • Debian (tested with 11)
  • MacOS (tested with 15.5)

Dependencies

VCF.JSON Generator has the following dependencies

  • ImportExcel PowerShell Module
  • VMware.PowerCLI or VCF.PowerCLI PowerShell Module

Dependent modules and PowerCLI configuration settings may be configured using the Set-VCFJsonGenerationPrequisites cmdlet. This will detect installed modules, and if not present will install them. While VCF.JSONGenerator can leverage either VMware.PowerCLI or VCF.PowerCLI, it will install VCF.PowerCLI if neither are present due to it being the newer version of the module.

General Use

VCF.JSON Generator creates JSON files by reading data from a populated VCF 9.0 P&P workbook. After installing the module, navigate to the folder containing your P&P workbook(s) and use Start-VCFJsonGeneration. Use option 1 to discover and load a P&P workbook. Sections and Options with sections will be dynamically enabled/disabled based on the settings in the chosen file.

Not all configuration options within the P&P workbook are supported yet. They will gradually be included over time.

NOTE: VCF.JSONGenerator does not automate the pre-requisites for any of the JSON File, nor does it submit the JSON payload to an API endpoint. It is the users responsibility to configure pre-requisites by following the VCF documentation and to submit the JSON to the API in their own desired manner.

Interactive Mode

In many cases, a fully functional JSON payload requires the inclusion of unique identifiers for items such SDDC Manager object IDS, vCenter and NSX object IDs, or SSH fingerprints. In such cases, the user is asked if they want to retrive these programmatically. If this option is chosen, the user is prompted to provide credentials to the relevant running systems from which IDs need to be retrieved. If interactive mode is not selected, the corresponding files are populated with text in the format ‘<– ENTER THE ID OF XXXXXXXXXX –>’ to allow the user to retroactively populate those fields prior to submitting the JSON to the relevant VCF API Endpoint.

Supported & Unsupported Permutations

The following are the list of tested / supported permutations.

VCF Installer JSON File

  • When P&P operation is configured to be Deploy a new VCF fleet or Deploy a VCF Instance in an existing VCF fleet
  • [Supported/Tested]
    • Deploy a new VCF Fleet
    • Simple Deployment Model
    • Highly Available Deployment Model
    • Deployment of VCF Operations and VCF Automation Day-N
    • Deployment of VCF Operations with VCF Autuomation
    • Joining an existing VCF Fleet
    • Deployment of VSAN-OSA and VSAN-ESA based Management Clusters
  • [Supported/UnTested]
    • Deployment leveraging existing components

General Features

  • Are enabled for all relevant operations
  • [Supported/Tested]
    • Network Pool Creation for vSAN HCI Cluster
    • Network Pool Creation for vSAN Storage Cluster with Storage Client Traffic
    • Host Commissioning vSAN HCI
    • Host Commissioning vSAN Storage Cluster with Storage Client Traffic
    • Stretched Cluster (that has been deployed as part of a workload domain or as an additional cluster)
      • [Supported/Tested]
        • Single-Rack / Layer-2 Multi-Rack HCI Cluster
        • Single-Rack / Layer-2 Multi-Rack Storage Cluster
        • Single-Rack / Layer-2 Multi-Rack Compute Only Cluster
      • [Unsupported]
        • Multi-Rack / Layer-2 Multi-Rack HCI Cluster
        • Multi-Rack / Layer-2 Multi-Rack Storage Cluster
        • Multi-Rack / Layer-2 Multi-Rack Compute Only Cluster

Workload Domains

  • First workload domain when P&P Operation is set to Deploy a new VCF fleet or Deploy a VCF Instance in an existing VCF fleet
  • Additional workload domains can be done when P&P Operation is set to Create VI Workload Domain
  • [Supported/Tested]
    • Workload Domain With Single-Rack / Layer-2 Multi-Rack HCI Cluster
    • Workload Domain With Layer-3 Multi-Rack HCI Cluster
  • [Unsupported]
    • Workload Domain With Multi-Rack Compute Only Cluster
    • Workload Domain With Multi-Rack Storage Cluster

Clusters

  • When P&P Operation is set to Create Cluster
  • Additional vSphere Clusters
    • [Supported/Tested]
      • Single-Rack / Layer-2 Multi-Rack HCI Cluster
      • Single-Rack / Layer-2 Multi-Rack Storage Cluster
      • Single-Rack / Layer-2 Multi-Rack Compute Only Cluster
      • Layer-3 Multi-Rack HCI Cluster
      • Layer-3 Multi-Rack Compute Only Cluster
      • Stretching of existing Single-Rack HCI Cluster
      • Stretching of existing Single-Rack Storage Cluster
      • Stretched Compute Only Cluster in a single operation
    • [Unsupported]
      • Multi-Rack Storage Cluster

Edge Clusters

  • For any domain type
  • [Supported/Tested]
    • Centralized Connectivity with BGP
    • IP List / IP Pool / DHCP Edge TEPs Addressing
  • [Unsupported]
    • Static Routes

Day-N Fleet Management Deployments

  • [Supported/Tested]
    • VCF Identify Broker (Appliance Mode)
    • VCF Operations and Automation (via SDDC Manager Workflow)
      • Simple Deployment Model
      • Highly Available Deployment Model
    • VCF Operations for Logs (via Fleet Manager)
      • Simple Deployment Model
      • Highly Available Deployment Model
    • VCF Operations for Networks (via Fleet Manager)
      • Simple Deployment Model
      • Highly Available Deployment Model
    • All of the above on
      • Shared Management Network
      • Dedicated VLAN network
      • NSX Overlay Network
      • NSX VLAN segment

Troubleshooting

  • There is a very tight coupling between the version of the Planning & Preparation file you use and the version of the VCF.JSONGenerator Powershell Module. Bug resolution may involve a change to either or both of these elements. Please ensure that all required values in the Planning & Preparation workbook are populated in the desired format. In time, depending on the appetite for this module, I may introduce input format validation and cross-checking

3 thoughts on “Introducing the VCF.JSONGenerator PowerShell Module for VMware Cloud Foundation

Add yours

  1. excel sheet in 2025 as database. Sorry but i would expect much simpler solution. And you mention it is ever changing and Work in progress. Please think of something better than excel sheet.

    Like

    1. Hi there. Sorry for delay in responding. We are currently considering retooling the workbook into another form. However a key point to make for this post is that the excel file was not created with the goal of being the database for the VCF.JSONGenerator – rather its a pre-existing planning tool for VCF customers who can sit around a table with our account teams and work out the details of their deployment and capture the inputs required to do it. The VCF.JSONGenerator is designed to get the most out of that experience, so that users dont have to repopulate JSON files for deployments by hand. If we retool the workbook, we would naturally retool the mechanism to generate the JSONs in line with it.

      Like

Leave a reply to feardamhan Cancel reply

Blog at WordPress.com.

Up ↑