WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / VMware Cloud Foundation with a single ESXi host for Workload Domain?

VMware Cloud Foundation with a single ESXi host for Workload Domain?

02.23.2023 by William Lam // 5 Comments

Earlier this week, we demonstrated that we could deploy a VMware Cloud Foundation (VCF) Management Domain using just a single ESXi host. In addition, we can further optimize the deployment for homelab purposes by removing the CPU and memory reservations for NSX when deploying either a VCF Management or Workload Domain.

The most logical question that I am sure some of you are probably asking ... besides, how much time I actually spent testing these scenarios out!? (I rather not comment 😵‍💫) ... is what about deploying a VCF Workload Domain with just a single ESXi host? 🤔


You guessed it, it is definitely possible!

Disclaimer: This is not supported by VMware, use at your own risk. As of writing this blog post, this trick is functional with the latest VCF 4.5 release.

By default, SDDC Manager will only allow a Workload Domain to be created with two or more ESXi hosts and to be able to deploy with just a single ESXi host, the deployment will need to be initiated from the VCF REST API and within the SDDC Manager.

Step 1 - Before starting a VCF Workload Domain deployment, SSH to the SDDC Manager VM using the vcf user account and then switch to root by running the following command and providing the credentials to the vcf user:

su -

Step 2 - We then need to update the SDDC Manager configuration to allow for single ESXi host for Workload Domain and restart the service. The command below includes few other settings that can also benefit homelab environments including a single NSX Manager and increasing the timeout period while NSX is getting configured.

cat >> /etc/vmware/vcf/domainmanager/application-prod.properties << EOF
expected.minimum.hosts=1
vc7.deployment.option=tiny
nsxt.manager.formfactor=medium
nsxt.management.resources.validation.skip=true
nsxt.manager.cluster.size=1
nsxt.manager.wait.minutes=120
EOF

systemctl restart domainmanager.service

Step 3 - Next, we need to register or commission our single ESXi host that will be used to deploy the Workload Domain with SDDC Manager. This step can be accomplished by using either the SDDC Manager UI or API. For detailed UI steps, please refer to the official VCF documentation.

Step 4 - Since we need to use the VCF REST API to deploy the Workload Domain, we need to retrieve the ID that has been associated with our commissioned ESXi host, which was completed from the previous step. Run the following command on the SDDC Manager which should return both the ID and hostname of your ESXi host. Please make a note of the ID as it will be needed in the next step.

curl -s http://localhost/inventory/extensions/vi/esxis?unassignedOnly=1 | json_pp | jq '.[] | .id, .hostname'


Step 5 - Download the example JSON deployment file vcf45-workload-domain-example.json and adjust the values or append additional configurations based on your environment. In addition to changing the hostname/IP Addresses you will also need to complete the following:

  • Replace the FILL_ME_IN_COMMISSION_HOST_ID string with the ID generated from Step 4
  • Replace all the FILL_ME_IN_VCF_*_LICENSE_KEY with valid VCF 4.5 licenses 
  • The additionalManagerNodesSpec section must still contain valid DNS/IP Address entries EVEN if you intend to only deploy a single NSX due to VCF REST API pre-checks

Once you have completed all of your changes, copy the JSON file to the SDDC Manager.

Step 6 - Lastly, to begin the Workload Domain deployment, run the following command and pass in the modified JSON configuration file:

curl -X POST -H "Content-Type:application/json" http://127.0.0.1/domainmanager/vidomains -d[at]vcf45-workload-domain-example.json

If the SDDC Manager accepts the JSON configuration file, you should see a task response in the command-line and you can then monitor the rest of the deployment progress using the SDDC Manager UI.


If everything was configured correctly, you should eventually see a new Workload Domain appear in in the SDDC Manager UI with a status of ACTIVE as shown in the screenshot above.

For my testing, I deployed using my Nested ESXi Virtual Appliance VMs and as you can see from the screenshot below, here are the final set of VMs that were deployed for my particular setup.


Note: While SDDC Manager does provide a remote public VCF REST API for deployments among all other operations, I found that the external JSON format differs from the one that is accepted when directly calling from within SDDC Manager. It may be possible to deploy a VCF Workload Domain using a single ESXi host using the public API, but that was something I did not have time to try and would be a good exercise for those familiar with the VCF REST API. Additionally, if you need to troubleshoot your deployment, a good place to look is SDDC Manager logs at /var/log/vmware/vcf/domainmanager/domainmanger.log which can provide some insights on what might be failing.

More from my site

  • VMware Cloud Foundation 5.0 running on Intel NUC
  • VMware Cloud Foundation on Intel NUC?
  • ESXi on GMKtec NucBox K11
  • Quick Tip - VMware Cloud Foundation (VCF) Bringup fails without persistent ESX-OSData
  • Enhancements to VMware Cloud Foundation (VCF) & vSphere Automated Lab Deployment Scripts

Categories // Automation, Home Lab, VMware Cloud Foundation Tags // homelab, VMware Cloud Foundation

Comments

  1. *protectedGareth Corbett says

    03/20/2023 at 9:06 am

    I got as far as step 6.
    Please can you update with better example of how to upload the json file?
    I get the error: (3) URL using bad/illegal format or missing URL

    Reply
    • *protectedCory says

      05/03/2023 at 2:14 pm

      You can post a json file with curl like so:

      curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
      so for example:

      curl -X POST -H "Content-Type: application/json" -d @../data/cats.json http://localhost:8080/mSfvMwNAfj

      Reply
  2. *protectedDanilo Perillo Chiacchio says

    06/24/2024 at 10:07 am

    Hi William, great article!
    Is this a way to define the vCenter Server size for VI deployments on VCF 5.1.1?
    Thank you,
    Danilo.

    Reply
  3. *protectedNathan Chan says

    08/20/2024 at 9:56 pm

    Thanks William ! Would you happen to have a 5.2 workload domain template example ? Thanks

    Reply
    • *protectedNathan Chan says

      08/28/2024 at 3:07 am

      I can confirm it worked on 5.2 after i got rid of my Typo ! 🙂

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