PowerCLI

 View Only
  • 1.  Automated VMware Cloud Foundation (VCF) 9.0 Lab Deployment Script from William Lam

    Posted Mar 10, 2026 10:17 AM

    @William Lam or anyone who can help me. 

    I'm using the script William Lam has so graciously provided (GitHub - lamw/vcf-fleet-automated-lab-deployment: Automated VMware Cloud Foundation (VCF) 9.x Fleet Lab Deployment)

    After adding the necessary configuration items to the config file (sample-william-vcf.ps1), the script runs without error, but fails when trying to download the software bundle after many retries attempted due to the script waiting after each retry.  However, it's not enough time, when I look at the web interface for the installer, I can see that it's still in the process of downloading components.  It really shouldn't take as long as it's taking. 

    I would like to be able to use this script to deploy multiple test environments.  How can I use the VCF Installer as a static appliance?  In other words, wait for the installer to complete all the component downloads, then download the software bundle, but leave the installer appliance in place for other deployments...

    I realize that there is an "Offline" deployment method, but I'm pretty confused about how it works.  The way I understand it, it requires another stand alone machine to act as a web server and use of the "vcf-download-tool-9.x.tar.gz".  Wouldn't it be easier to be able to reuse the VCF Installer appliance"  

    I'm also brand new to VCF 9 and hoping to use this as an opportunity to become more familiar with this product.

    Help would be very much appreciated.

    Roger



    -------------------------------------------


  • 2.  RE: Automated VMware Cloud Foundation (VCF) 9.0 Lab Deployment Script from William Lam

    Posted Mar 11, 2026 07:35 AM

    Hi Roger.

    I looked through the script and he is using Sleep timers and a Wait.  Are you letting your computer screen-lock to engage?  This can affect the Sleep process.

    -------------------------------------------



  • 3.  RE: Automated VMware Cloud Foundation (VCF) 9.0 Lab Deployment Script from William Lam

    Posted Mar 11, 2026 09:38 AM

    Hi hgdeloitte,

    Thanks for your reply.  I'm running this on a "jump server" and also actively watching it.  You're right about the use of sleep timers and wait commands and I've considered increasing the amount of time it waits.  I'm including the output from the script below, because this is one of the things I'm confused about.  I would assume this is happening in the Download-VCFBundle Function, however I can't figure out where exactly the terminal output below is coming from!  I see references the following variable assignments below, but don't know where they are located, or if that's even where I should be looking. 

    $srcNotificationScript = "vcf-bringup-notification.sh"
    $dstNotificationScript = "/root/vcf-bringup-notification.sh"

     

    TERMINAL OUTPUT

    [03-10-2026_09:29:02] Starting download for VRSLCM component ...                                                        
    [03-10-2026_09:29:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:31:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:33:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:35:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:37:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:39:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:41:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:43:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:45:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:47:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:49:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:51:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:53:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:55:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:57:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_09:59:03] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:01:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:03:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:05:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:07:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:09:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:11:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:13:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:15:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:17:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:19:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:21:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:23:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:25:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:27:04] VCF bundle download has not completed or has not been validated yet, sleeping for 5min ...        
    [03-10-2026_10:29:04] Failed to wait for VCF bundle download ...  

    -------------------------------------------



  • 4.  RE: Automated VMware Cloud Foundation (VCF) 9.0 Lab Deployment Script from William Lam

    Posted Mar 11, 2026 10:31 AM
    Edited by Roger Haines Mar 11, 2026 10:45 AM

    I was making that harder than it was.  I found where the wait was and increased it to 30 minutes.  The script said it was waiting 5 minutes, while in reality was waiting two minutes. 

    My-Logger "$VCFInstallerProductSKU bundle download has not completed or has not been validated yet, sleeping for 30min ..."
       sleep 1800

    Next I want to figure out where it's said how many times to retry?  Also, I want the script to determine if the "VMware Cloud Foundation Installer" already exists, then DON'T deploy it, and then determine if the bundle is complete and if so, go ahead and download it.  The reason for this is so the script doesn't redeploy the "VMWare Cloud Foundation Installer" appliance each time the script is run.  

    Best Regards,

    Roger

    -------------------------------------------



  • 5.  RE: Automated VMware Cloud Foundation (VCF) 9.0 Lab Deployment Script from William Lam

    Posted Mar 12, 2026 07:23 AM

    When I scanned through the script I didn't see a count put in place to determine a number of retries.  Therefore it should run until complete, times out or has an issue.

    Regarding checking for the file; here are some suggestions:

    Test-Path -Path "C:\temp\mytestfile.txt" -PathType Leaf

    $file = "C:\temp\important_file.txt"
     
    if (Test-Path -Path $file -PathType Leaf) {
        Write-Host "The file exists."
    } else {
        Write-Host "The file does not exist."
    }

    Or you could use:

    if (-not (Test-Path -Path $file -PathType Leaf)) {
        Write-Host "The file does not exist, creating it now."
    }

    There are other options.

    -------------------------------------------



  • 6.  RE: Automated VMware Cloud Foundation (VCF) 9.0 Lab Deployment Script from William Lam

    Posted 7 days ago
    Edited by Shaun-Leigh Mackolisky 7 days ago

    Hi Roger,

    The issue is actually within the Download-VCFRelease function which starts at line 288.

    The error is on line 336 where it's referencing an undefined variable.

    Change ${VCFInstallerVersion} to ${VCFInstallerProductVersion} and then retry.

    Let me know if that works! 🤓

    Best,

    Alex

    -------------------------------------------