I finally got some time to update my Automated VMware Cloud Foundation Lab (VCF) Deployment script to support the latest VCF 5.1 release as this has been requested by a number of folks both internally and externally.
In addition to updating some of the new resource requirements such as increasing the Nested ESXi vSAN capacity drive from 60GB to 100GB, I was also thinking about some of the feedback that I had received internally from one of our engineers and that gave me some ideas on how to further stream the deployment using automation. I also came up with a few new ideas that I have added to the script, some of which I will cover in a future blog post 😁
The first thing you will notice is that you can now specify the number of ESXi hosts to deploy both for the VCF Management Domain as well as for a Workload Domain.
The script is doing more than just deploying the required Nested ESXi VM, but it will actually generate the VCF commission host file (JSON) that can then be used make SDDC Manager aware of the new ESXi hosts, which can then be used to deploy a Workload Domain.
While the previous version of the script already generated the required VCF Management Domain bringup file (JSON) based on your input, the VCF Bringup was performed manually by logging into the Cloud Builder UI and uploading the generated JSON file to begin the deployment. I have now enhanced the script to automatically wait for the Cloud Builder VM to be ready and then automatically initiate the VCF Bringup using the generated JSON, so there are no additional manual steps required other than opening a browser to the Cloud Builder URL to monitor the progress of your VCF deployment!
In my environment, the deployment of the 8 x Nested ESXi VM, Cloud Builder VM and initiating the bringup process took ~19minutes and then it took another ~1.5hrs for the complete VCF Management Domain to be fully deployed and configured. YMMV based on your available resources
Hopefully folks apperciate the additional simplicity of using this script and if you have any feedback, feel free to drop a comment here or better yet, leave a comment directly in the repo or even submit a PR. For the complete list of changes in the script, be sure to check out the change log section of the README in the repo. Enjoy!
Niclas says
Fantastic William! Thanks for sharing!
Matt T says
Will this work for non-nested configurations - Like your previous script you used to deploy VCF on Intel NUCs? I have 3 SFF hosts with similar in specs to the NUCs and want to deploy VCF - one MGMT two workload hosts - but reading through this script it looks like its mainly for nested builds.
William Lam says
Please see README for requirements
*protected email* says
Hi,
love your work. Great article. Just been running against a standalone host - not working as expected - lots of errors on not finding values:
[07-01-2024_08:33:53] Connecting to Management vCenter Server 10.100.1.148 ...
Get-Cluster: C:\VCF\vcf-automated-lab-deployment.ps1:263
Line |
263 | $cluster = Get-Cluster -Server $viConnection -Name $VMCluster
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 01/07/2024 08:33:53 Get-Cluster Cluster with name 'Compute' was not found using the specified filter(s).
Get-OvfConfiguration: C:\VCF\vcf-automated-lab-deployment.ps1:272
Line |
272 | $ovfconfig = Get-OvfConfiguration $NestedESXiApplianceOVA
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 01/07/2024 08:33:53 Get-OvfConfiguration This cmdlet requires a vCenter Server connection.
InvalidOperation: C:\VCF\vcf-automated-lab-deployment.ps1:273
Line |
273 | $networkMapLabel = ($ovfconfig.ToHashTable().keys | where {$_ …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
InvalidOperation: C:\VCF\vcf-automated-lab-deployment.ps1:274
Line |
274 | $ovfconfig.NetworkMapping.$networkMapLabel.value = $VMNetwork
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The property 'value' cannot be found on this object. Verify that the property exists and can be set.
William Lam says
Please see requirements 🙂 Hint: vCenter is required
*protected email* says
Ah - readme - not for standalone host....
mauro balbiani says
Hi William
the requrements mention a Standard or Distributed Portgroup (routable) to deploy all VMs. Why routable? Is it a must?
William Lam says
That was to convey that from the system where you run the PowerCLI script, that it'll be able to communicate to the network where the VMs are deployed and that it isn't some isolated network that you can't reach