Cross Cluster Workload Migration within the same clastic PVDC

Mar 01, 2023

I came into a scenario recently where we need to decommission a cluster from a provider PVDC where that cluster also contains workloads already provisioned by the customer through the VCD tenant portal. In order to do so, we need to migrate a bunch of workloads for an organization from the orgVDC under workload cluster 1 knowing that both workload cluster 1 and cluster 2 are part of an elastic PVDC spanning both clusters.

There may be other ways to do the migration but I want to share my simple procedure that I followed which may help others in case the hit the same use case. Always keep it simple!

1. Disable Cluster 2 resource pool under the PVDC

First of all and as we want to decommission workload cluster 2, we need to disable cluster 2 as a resource pool under the PVDC so that no new VMs can be provisioned by the customer onto that cluster and thereby introduce new VMs to be migrated in addition to the existing ones.

 

Note: This will not affect the running VMs under cluster 2. They will remain running but we are only disabling the capability for the customer to provision new VMs to the cluster through VCD.

 

Login to the provider portal then navigate to Resources > Cloud Resources > Provide PVDCs. Select your PVDC then navigate to Resource Pools. Select your cluster Dand click Disable.

 

2. Disable the VM/Host rule of cluster 2 Placement Policy

Before we can migrate the workloads, we need to disable the VM/Host rule of the placement policy of cluster 2. When the rule is enabled, the provisioned VMs under cluster 2 can run only on cluster 2 ESXI nodes and can’t be migrated to cluster 1.

Select your cluster and navigate to Configure > Configuration > VM/Host Rules. Select your placement policy affinity rule, click Edit and disable it.

 

3. Migrate workloads from cluster 2 to cluster 1

We have a VM provisioned through VCD portal with a selected placement policy to run on workload cluster 2. I will illustrate the procedure by migrating this single VM but the same can be followed for the other workloads.

As we have a shared storage spanning both workload clusters, we have only to vMotion the workload (from compute perspective) from cluster 2 to cluster 1. To do so, right click on the VM choose Migrate.

Select Change compute resource only, and click Next.

Select Resource Pools, then choose the resource pool for the same OVDC under cluster 1.

Proceed with the default selections, Next > Next > Finish.

Now the VM is migrated, you can notice that it is running under the tenant OVDC in cluster 1.

 

4. Change the placement policy of the migrated workload

Login to the tenant portal and check the status of migrated VM. You will notice a warning message stating that the VM is non-compliant with the compute placement policy.

This is expected because the VM was originally provisioned to cluster 2 and the placement policy valued attached to the VM is still cluster 2 policy although the VM is running now under cluster 1 from vSphere perspective.

To comply with the compute policy from VCD perspective, we need to change the placement policy of the VM.

Navigate to Data Centers > Virtual Machines. Click on the VM and navigate to Hardware > Compute. You will notice that the placement policy is still pointing to cluster 2.

Click on Edit and change the placement policy to point to cluster 1.

Click Save.

You will notice now that the placement policy is changed and the warning message disappeared meaning that the VM is compliant again.

We are done with the VM migration completely. Notice that this was a live migration without any downtime. 

12 Feb, 2024
Embracing Change with VMware vSphere Foundation
VMware by Broadcom Dramatically Simplifies Offer Lineup and Licensing Model
13 Dec, 2023
VMware by Broadcom Dramatically Simplifies Offer Lineup and Licensing Model
By Mohamad AlHussein 01 Mar, 2023
This post will walk you through the steps needed to capture the incoming/outgoiing traffic on Tier0 gateway uplink level. The result will be a PCAP file that can be imported into a packet analyzer such as Wireshark for further troubleshooting and analysis.
More Posts
Share by: