• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

virtuallyGhetto

  • About
  • Privacy
  • VMware Cloud
  • Home Lab
  • Nested Virtualization
  • Automation
    • VMware Kickstart
    • VMware API/SDK/CLI
    • VMware vMA/VIMA
    • VMware OVF / OVFTOOL
  • Apple Mac
  • VCSA
  • VSAN

HCX

Using PowerCLI and vSphere Tags to create/migrate HCX Mobility Groups to VMware Cloud SDDC

10/21/2020 by William Lam Leave a Comment

If using your voice to create an HCX Mobility Group and initiate a migration to a VMware Cloud SDDC is not your thing, here is a more practical example using PowerCLI which includes HCX cmdlets that was introduced awhile back.


Here are the 12 configurable variables that you will need to update based on your own environment.

PowerShell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$VC_SERVER="vcsa.vmware.corp"
$VC_USERNAME="*protected email*"
$VC_PASSWORD="VMware1!"
$HCX_SERVER="hcx.vmware.corp"
 
$VSPHERE_TAG_CATEGORY="Cloud"
$VSPHERE_TAG_NAME="VMC"
 
# vMotion, Bulk, Cold, RAV, OsAssistedMigration
$MIGRATION_TYPE="RAV"
 
$TARGET_NETWORK_NAME="L2E_HOL-10-f58e483b"
$TARGET_DATASTORE_NAME="WorkloadDatastore"
$TARGET_RESOURCE_POOL_NAME="Compute-ResourcePool"
$TARGET_VM_FOLDER_NAME="Workloads"
 
$MOBILITY_GROUP_NAME="VMworld-2020-Demo"

[Read more...] about Using PowerCLI and vSphere Tags to create/migrate HCX Mobility Groups to VMware Cloud SDDC

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, Azure VMware Solution, Google Cloud VMware Engine, Oracle Cloud VMware Solution, PowerCLI, VMware Cloud, VMware Cloud on AWS Tagged With: HCX, Mobility Group, PowerCLI, tag, VMware Cloud, VMware Cloud on AWS

Automating HCX Multi-Site Service Mesh configuration using the new HCX PowerCLI cmdlets

07/01/2019 by William Lam 2 Comments

With the latest Hybrid Cloud Extension (HCX) R121 release, the new HCX Multi-Site Service Mesh configuration option is now the default and preferred method for setting up HCX. In fact, the legacy "HCX Components" method, which is focused on deploying individual HCX Appliances has been deprecated in the latest release and will be removed in the future, in favor of the new simplified deployment option.


As many of you know, I have been doing quite a bit of HCX Automation with VMware Cloud on AWS (VMC) and with the recent PowerCLI 11.3 release which now includes new HCX Multi-Site Service Mesh (MSSM) cmdlets, I figured this would be a good time to update my automation to take advantage of the new HCX MSSM feature.

While trying out the new MSSM cmdlets, I ran into a couple of issues which took me awhile to figure out. The issue stems from the fact that you can not simply create some of the MSSM objects such as a Network or Compute Profile and then save the output to a variable for use with other CSSM cmdlets, which I found to be quite strange as that is one of the biggest benefit of PowerShell and being able to pipe objects between cmdlets. You have to perform a "GET" operation on the object that you had just created because the types returned are different between the New and Get cmdlets. In any case, here is a sample end-to-end workflow using the new MSSM cmdlets as I figured others may run into this problem scratching their head and the PowerCLI documentation was not very clear about this behavior, at least it was not apparent to me.

[Read more...] about Automating HCX Multi-Site Service Mesh configuration using the new HCX PowerCLI cmdlets

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, HCX, PowerCLI, VMware Cloud on AWS Tagged With: HCX, HCX Multi-Site Service Mesh, Hybrid Cloud Extension, PowerCLI, PowerCLICore, VMC, VMware Cloud on AWS

Automating HCX Add On for VMware Cloud on AWS

06/19/2019 by William Lam 1 Comment

Enabling Hybrid Cloud Extension (HCX) for a VMware Cloud on AWS SDDC is just a click of a button and is completely self-service which makes consuming the HCX Service extremely easy! All the hard work of deploying and configuring the required HCX infrastructure for your SDDC is completely automated for you by VMware when you click on "Deploy HCX" button.


Once the HCX infrastructure has been deployed in your SDDC, you can then deploy the respective HCX components for your on-premises vSphere environment which you can fully automate end-to-end which I have blogged about here.

Although the deployment of the HCX components for the SDDC is just click of a button, I recently had a need to automate this and I figure this would be a nice addition to my HCX PowerShell Community Module and complete the end-to-end story quite nicely from enabling the HCX Cloud Service to automating the deployment and configuration of the on-premises HCX components.

[Read more...] about Automating HCX Add On for VMware Cloud on AWS

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, HCX, PowerCLI, VMware Cloud on AWS Tagged With: HCX, Hybrid Cloud Extension, VMC, VMware Cloud on AWS

Automating complete HCX deployment and configuration to first cloud migration using PowerCLI

03/04/2019 by William Lam 1 Comment

PowerCLI 11.2.0, was just released last week and for a "dot" release, it includes a number of new capabilities and enhancements. One of the most exciting features for me personally was the introduction of the VMware Hybrid Cloud Extension (HCX) PowerCLI module which I also had the pleasure of working on and providing early feedback to the HCX Engineering team. The new HCX module enables customers to use PowerCLI to now easily automate the HCX Fleet deployment (Interconnect, WAN Optimization and Network Extension) as well as perform bulk live migrations of  workloads between two HCX-enabled environments, with on-premises vSphere to VMware Cloud on AWS (VMC) being the most popular.

I have written a number articles on HCX Automation using both the HCX REST API and PowerCLI and with this latest PowerCLI module, I realized that we now have complete end-to-end automation with PowerCLI from the HCX OVA deployment to initial configuration and fleet deployment to your very first HCX vMotion! This is quite exciting as I know a number of folks have been asking about automating the fleet deployment, especially for enabling quick proof of concepts and quickly showing the value of HCX to our customers for moving large amount of workloads without any downtime.

Below, you will find a breakdown of the HCX setup which I have split into three sections, each section includes the respective PowerCLI sample code that can easily be adapted to your own environment. I look forward to seeing what customers do with the new HCX PowerCLI module and if you have any feedback, be sure to leave a comment or better yet, file a feature enhancement using the PowerCLI Feature Request Tool.

[Read more...] about Automating complete HCX deployment and configuration to first cloud migration using PowerCLI

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, HCX, PowerCLI, VMware Cloud on AWS Tagged With: HCX, Hybrid Cloud Extension, PowerCLI, PowerCLICore, VMC, VMware Cloud on AWS

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

[Read more...] about Automating Hybrid Cloud Extension (HCX) Manager initial configuration for VMC

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: Automation, HCX, VMware Cloud on AWS Tagged With: HCX, Hybrid Cloud Extension, PowerCLI, PowerCLICore, VMware Cloud on AWS

Quick Tip – How to clear all Hybrid Cloud Extension (HCX) Migrations in the vSphere UI

10/11/2018 by William Lam Leave a Comment

During the development of my Cloud Motion with vSphere Replication automation script for Hybrid Cloud Extension (HCX), I extensively used the HCX vSphere UI for testing and debugging purposes.


Under the Migration view, you can see all active and completed migrations, including any failed migration attempts. In my particular environment, there had been a few hundred migrations and with my additional testing, that added quite a few more. Although you can filter by name or sort by the type of operation, it was still not very convenient for me while developing the script. I wanted a quick way to view the details after calling the HCX APIs and by the time I jumped to the UI, I would have missed a few of those updates.

In speaking with one of the HCX Engineers, I found out that you could simply drop all migration history from the internal database (this would remove all the history for past migrations including failures). In general, I do not see this being something customers would have a need for in Production, as you would want to keep all the history for auditing or debugging purposes. This is probably more for demo or testing purposes and below are the instructions on how to clear all migrations from your HCX Manager.

[Read more...] about Quick Tip – How to clear all Hybrid Cloud Extension (HCX) Migrations in the vSphere UI

Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Filed Under: HCX, Not Supported, VMware Cloud on AWS Tagged With: HCX, Hybrid Cloud Extension, MongoDB, VMware Cloud on AWS

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Services Business Unit (CSBU) at VMware. He focuses on Automation, Integration and Operation for the VMware Cloud Software Defined Datacenters (SDDC)

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Sponsors

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