Managing HCX Migration via Powershell

HCX supports 3 methods for migrating VM’s to cloud:

  • Cold Migration
  • HCX Cross-Cloud vMotion
  • HCX Bulk Migration

To know more about these migration methods, please read this post  to know more about the migration methods. 

HCX migrations can be scheduled from the HCX UI using the vSphere Client or can be automated using the HCX API. In last post of this series, I demonstrated few PowerCli commands that we can use for HCX system. 

API/PowerCli is obvious choice when you think of automation. Using automation do not only help in reducing the amount of user input required in UI but reduces the chances of human errors as well. Read More

Getting Started With HCX PowerCli Module

With the release of PowerCli 11.2, support for many new VMware products was introduced and VMware HCX is one such product. PowerCli module name for HCX is “VMware.VimAutomation.HCX” and it currently have 20 cmdlets to manage HCX.

You can use windows power shell to install/upgrade your PowerCli to v11.2 using below commands:

1: Once the necessary module is installed, we can use the Get-Command to examine the cmdlets that are available for HCX.

Get-Command -Module VMware.VimAutomation.HCX Read More

Exploring HCX API

VMware Hybrid Cloud Extension is a powerful product for datacenter migration/replacement (On-Prem or from On-Prem to Cloud) and disaster recovery.  VMware HCX supports 3 major cloud at the moment namely VMware Cloud on AWS, OVH Cloud and IBM Cloud.

Although HCX interface for workload migration is very simple and even the first times can migrate workloads without much difficulty, but it is always good to know about the API offering of any product so that you can automate stuffs via scripting.

HCX API allows customers to automate all aspects of HCX including the HCX VAMI UI for initial configuration as well as consuming the HCX services which are exposed in the vSphere UI. Read More

Locating HCX System ID

HCX System ID is needed when you are working with VMware support team regarding any HCX issues. 

HCX system id can be found via CLI as well as GUI. We will discuss both methods in this post.

CLI Method (You can only find on-prem HCX system id using this method)

Connect to the on-prem HCX ENT appliance via console or SSH using admin credentials and run command: cat /common/location

[admin@hcx-ent ~]$ cat /common/location
20180706133208221-8da8d93e-4182-4b26-8cba-f582f77be7cf
[admin@hcx-ent ~]$ Read More

Learning HCX-Part 11: Testing DR With HCX

In last post of this series we performed a reverse migration and brought a VM back to on-prem from cloud. Now we have tested all migration method and have basic understanding of how they work, lets move forward to explore Disaster Recovery capabilities provided by HCX.

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration Read More

Learning HCX-Part 10: HCX Reverse Migration

In last post of this series we learnt about Bulk Migration feature of HCX. In this post we will learn about HCX Reverse Migration.

Reverse migration provides you the ability to migrate VMs back from your cloud infrastructure to your on-premises environment using the HCX migration methods (No downtime/Cold migration/Bulk migration).

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration Read More

Learning HCX-Part 9: Testing HCX Bulk Migration

In last post we tested the Cross-Cloud vMotion feature of HCX. In this post we will be testing the bulk migration feature.

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration

4: HCX Site Pairing

5: Configuring Interconnect Networks

6: Deploying Fleet Appliances

7: HCX Migration Methods

8: Testing HCX Cross Cloud Migration Read More

Learning HCX-Part 8: Testing HCX Cross Cloud Migration

In last post of this series we discussed about various migration methods that are available with HCX. In this post we will be testing the cross-cloud migration method in lab. 

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration

4: HCX Site Pairing

5: Configuring Interconnect Networks

6: Deploying Fleet Appliances

7: HCX Migration Methods Read More

Learning HCX-Part 7: HCX Migration Methods

In last post of this series we deployed the Cloud Gateway and the Layer 2 Concentrator virtual appliances. Next is to explore various migration methods to migrate workloads from on-prem datacenter to the cloud.

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration

4: HCX Site Pairing

5: Configuring Interconnect Networks

6: Deploying Fleet Appliances Read More

Cleanup HCX Deployment

In this post we will learn about how to do cleanup of a HCX deployment in a right way. 

Below are the high level steps for HCX cleanup.

1: Unstretch a Layer 2 Network : Unstretching a Layer 2 network is necessary before removing the associated L2C appliance. Steps given below

  • Login to vCenter Web Client and click on HCX plugin and navigate to Interconnect > Extended Networks tab.
  • Select the network you want to remove and click the X button and hit OK to confirm.

2: Delete the L2C virtual appliance: To delete the L2C appliance, go to interconnects > HCX Components > Network Extension Service tab and select the appliance and click on Remove. 

l2c-remove.PNG

Click on Yes to confirm deletion of appliance. Read More

Learning HCX-Part 6: Deploying Fleet Appliances

In last post of this series we did the fleet configuration so that we can deploy the fleet appliances. In this post we will discuss about the fleet appliances and will deploy them.

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration

4: HCX Site Pairing

5: Configuring Interconnect Networks

There are 3 appliances that you can deploy in your HCX environment: Read More

Learning HCX-Part 5: Configuring Interconnect Networks

In last post of this series we paired HCX Enterprise with the HCX Cloud appliance. Now the next task is to deploy the fleet appliances, but before doing any deployment we have to configure the networks for interconnects i.e fleet configuration.

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration

4: HCX Site Pairing

Basically we are defining a pool of IP’s which interconnect appliances will use when we start deploying them. High level steps of fleet config are summarized as below. Read More

Learning HCX-Part 4: HCX Site Pairing

In this post we will be pairing the HCX-Enterprise appliance with the HCX-Cloud to start consuming HCX features.

If you are not following along this series, then I recommend reading earlier posts of this series from below links:

1: Introduction to HCX

2: HCX Enterprise Deployment & Configuration

3: HCX Cloud Deployment & Configuration

Site pairing task is straight forward and it should compelte without any issue if all your configuration is correct. However In my lab I was getting an error “untrusted ssl connection” when trying to do site pairing. Read More

HCX Site Pairing failed with error “Untrusted SSL Connection”

In last post of HCX series, we deployed HCX Cloud appliance and performed basic configuration. The next step was to pair the HCX Enterprise appliance to the HCX Cloud so that we can start consuming HCX features. 

When I tried pairing the on-prem HCX to HCX Cloud, I was getting ssl connection error and site pairing task was failing.

site-pairing-error.png

I was pretty sure that this is happening because of untrusted ssl certs in my lab and I was thinking that may be I need to replace the self-signed certs with the CA signed certs.  Read More

Learning HCX-Part 3-HCX Cloud Deployment & Configuration

In last post of this series, we deployed the HCX Enterprise appliance in on-premise and connected it to vCenter server, NSX manager and PSC. In this post we will deploy HCX cloud appliance in cloud side and will walkthrough basic configuration steps.

As of now, I don’t have a true cloud site but I have 2 vCenter servers in 2 location. Site A is where I deployed HCX Enterprise and Site B is where I am deploying HCX Cloud applaince. I am treating my Site B as cloud location for now.

HCX Cloud deployment is very much similar to HCX Enterprise deployment. Below slideshow walkt hrough the deployment steps. Read More