WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Automating Hybrid Cloud Extension (HCX) Manager initial configuration for VMC

Automating Hybrid Cloud Extension (HCX) Manager initial configuration for VMC

10.29.2018 by William Lam // 2 Comments

Following up from my previous Hybrid Cloud Extension (HCX) Automation article which looked at deploying the HCX Manager OVA, this article will now focus on automating the initial configuration of HCX Manager including the registration to HCX Cloud which will enable the on-prem HCX Manager to be used with VMware Cloud on AWS (VMC). Once HCX Manager is up and running, customers can configure the system using the HCX VAMI interface which is available on port 9443 via the UI or in our case with the HCX VAMI APIs. 


I have updated my HCX PowerShell Module to include 8 additional functions that can be used for initial configuration of HCX Manager:

  • Set-HcxVCConfig
  • Set-HcxLicense
  • Get-HcxNSXConfig
  • Set-HcxNSXConfig
  • Get-HcxLocation
  • Set-HcxLocation
  • Get-HcxRoleMapping
  • Set-HcxRoleMapping
  • Get-HcxProxy
  • Set-HcxProxy
  • Remove-HcxProxy

In addition, I have also created a simple PowerShell script called configure_hcx_manager.ps1 which demonstrates how these functions can be used to setup HCX Manager.

Step 1 - Download and import the HCX PowerShell Module

Import-Module ./VMware.HCX.psm1

Step 2 - Next, we need to generate an HCX activation key that we can use to register our HCX Manager with HCX Cloud. Login to VMware Cloud on AWS (VMC) portal and under "Add-Ons" for your SDDC, click on the HCX link to open. From here, navigate to the "Activation Keys" and create a new key. Make a note of the key as this will be needed later.


Step 3 - Download the configure_hcx_manager.ps1 PowerShell script and edit the variables at the top and replace it with the configuration of your environment including the HCX activation key from the previous step.

Step 4 - Connect to to the HCX VAMI endpoint using the Connect-HcxVAMI cmdlet and specify the HCX Manager and the credentials you have configured when you deployed the OVA.


Note: Make sure that your HCX Manager has outbound connectivity to HCX Cloud (https://connect.hcx.vmware.com), as this is required for the initial registration. You may need to work with your network team to allow traffic through the firewall for this particular endpoint.

Step 5 - Once you have confirmed the login was successful, you can now run the configure_hcx_manager.ps1 script which will start configuring HCX Manager.


If everything was configured correctly, you should see similar output to the above screenshot. At this point, you can now login to your on-prem vCenter Server that you have registered HCX Manager and you should now see a new vSphere UI plugin for HCX. From here, you create a pairing between you on-prem vCenter Server and the VMC vCenter Server along with deploying the HCX Fleet appliances which includes the HCX Gateway, Interconnect & WAN Optimization.

Lastly, we can also verify our HCX configuration by using the various Get-Hcx* commands, below are examples of using the Get-HcxVCConfig, Get-HcxNSXConfig, Get-HcxLocation & Get-HcxRoleMapping functions:

More from my site

  • Automating HCX Multi-Site Service Mesh configuration using the new HCX PowerCLI cmdlets
  • Automating complete HCX deployment and configuration to first cloud migration using PowerCLI
  • Getting started with the Hybrid Cloud Extension (HCX) APIs
  • Using PowerCLI and vSphere Tags to create/migrate HCX Mobility Groups to VMware Cloud SDDC
  • Automating HCX Add On for VMware Cloud on AWS

Categories // Automation, HCX, VMware Cloud on AWS Tags // HCX, Hybrid Cloud Extension, PowerCLI, PowerCLICore, VMware Cloud on AWS

Comments

  1. *protected724Press says

    10/30/2018 at 4:36 am

    Hi, Thank you for this useful article 😉

    Reply
  2. *protectedMark McGilly says

    05/01/2019 at 1:57 pm

    Hi William

    Do you know if there is an API for setting the Syslog Server?

    Thanks
    Mark

    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

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • 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

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