WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • 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 // 1 Comment

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=small
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 *protected email*

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 on Intel NUC?
  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit
  • SSD with multiple NVMe namespaces for VMware Homelab
  • Interesting VMware Homelab Kits for 2023
  • ESXi on palm size iKOOLCORE R1

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

Comments

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

Thanks for the comment! Cancel reply

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

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to enable passthrough for USB Network Adapters claimed by ESXi CDCE Driver? 03/30/2023
  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit 03/29/2023
  • ESXi configstorecli enhancement in vSphere 8.0 Update 1 03/28/2023
  • ESXi on Intel NUC 13 Pro (Arena Canyon) 03/27/2023
  • Quick Tip - Enabling ESXi Coredumps to be stored on USB 03/26/2023

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 © 2023

 

Loading Comments...