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 / 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. 724Press says

    10/30/2018 at 4:36 am

    Hi, Thank you for this useful article 😉

    Reply
  2. Mark 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

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

  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023
  • Is my vSphere Cluster managed by vSphere Lifecycle Manager (vLCM) as a Desired Image or Baseline? 03/10/2023
  • Interesting VMware Homelab Kits for 2023 03/08/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...