WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Automating HAProxy VM deployment with 3-NIC configuration using PowerCLI

Automating HAProxy VM deployment with 3-NIC configuration using PowerCLI

11.02.2020 by William Lam // 2 Comments

When deploying the HAProxy VM as part of vSphere with Tanzu, customers have the option of deploying the HAProxy VM using either a 2-NIC or 3-NIC configuration. The default OVF Deployment Option is the 2-NIC design called "Default" and the 3-NIC design is called "Frontend".

From an Automation point of view, you can use either OVFTool or PowerCLI to automate the deployment. For a 2-NIC example, you can refer to my Automated vSphere with Tanzu Lab Deployment Script. However, for the 3-NIC example, a few folks were running into some issues when using PowerCLI for the automation.

The main issue is that because the default OVF Deployment Option is the 2-NIC design (Default), the two additional OVF properties frontend_ip and frontend_gateway is basically hidden when processing the OVF properties when PowerCLI.

Note: You can view these optional properties by running the following OVFTool command: ovftool --X:enableHiddenProperties vmware-haproxy-v0.1.8.ova


Even if you specified the "Frontend" OVF Deployment Option, PowerCLI does not seem to have the logic to retrieve the other optional parameters and hence can not be set as part of the initial deployment.

A workaround to this problem is to simply update these OVF parameters after the initial import but prior to powering on the VM. I had previously blogged about using PowerCLI to update existing OVF properties and we will borrow from that script to demonstrate how to automate HAProxy VM using 3-NIC configuration.

I have created an example PowerCLI script called deploy_3nic_haproxy.ps1 which you will need to update the variables to match your deployment.

More from my site

  • Automated enablement of vSphere with Tanzu using vSphere Zones in vSphere 8
  • Automated Lab Deployment Script for vSphere with Tanzu using NSX Advanced Load Balancer (NSX ALB)
  • Complete vSphere with Tanzu homelab with just 32GB of memory!
  • Automating Workload Management on vSphere with Tanzu
  • Quick Tip - Retrieving vSAN File Share Network Permissions using vSAN API & PowerCLI

Categories // Automation, PowerCLI, VMware Tanzu Tags // HAProxy, PowerCLI, vSphere Kubernetes Service

Comments

  1. *protectedEndra says

    01/03/2025 at 11:27 pm

    hi william,

    i plan to deploy Tanzu Kubernetes Service from VVF license using HAProxy as a load balancer. is it still valid to use OVA file from this project ?
    https://github.com/haproxytech/vmware-haproxy

    Thanks

    Reply
    • William Lam says

      01/04/2025 at 7:56 am

      Yes, the VMware HAProxy OVA can still be downloaded from GH repo

      Reply

Leave a Reply to William LamCancel 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...