A customer contacted me a few days ago and wanted a operational procedure for moving a vCloud Director (vCD), version 5.5, based virtual machine (VM) from one vSphere cluster to another vSphere cluster. My customer uses vSphere version 5.5 and had one major requirement that had to be taken into account.
The VM has to be powered on when it is being moved.
This blog post is divided into two sections, the first one will present the vCD and vSphere setup and the second one will present the solution.
The pictures are form my test environment where i created a copy of my customers environment.
vSphere and vCD setup
The vSphere (version 5.5) layer consists of 2 vSphere clusters:
vSphere cluster VCDX56-02-VCD01 consists of the ESXi hosts:
- Bimini01
- Bimini02
vSphere cluster VCDX56-02-VCD02 consists of the ESXi hosts:
- Bimini03
- Bimini04
My customers production environment only presents datastores per vSphere cluster. and to simplify the blog post there is only one datastore available per vSphere cluster.
- vSphere cluster VCDX56-02-VCD01 got access to Datastore DS-Cloud-01.
- vSphere cluster VCDX56-02-VCD02 got access to Datastore DS-Cloud-02.
The datastore:
- DS-Cloud-01 is addressed in vCD via the Storage Policy SP-Cloud-01.
- DS-Cloud-02 is addressed in vCD via the Storage Policy SP-Cloud-02.
There is one vCD Provider Virtual Datacenter (PvDC) created, PvDC-01 and it is connected to both the vSphere clusters.
vCD is configured to allow the vCD allocation model Allocation Pool to be elastic meaning my Org vDC can place VMs on both vSphere clusters.
Solution
In this case i had to create one additional datastore, named DS-Cloud-Shared-01, and present the it to both vSphere clusters . This will make it possible to move a VM form one vSphere cluster to the other without turning the VM off.
The DS-Cloud-Shared-01 datastore is addressed in vCD via the Storage Policy SP-Cloud-Shared-01.
The PvDC have access to three datastores:
The Org vDC has access to the same datastores as the PvDC:
The VM i wanted to move is called VM-11.
It was originally placed in vSphere cluster VCDX56-02-VCD02 (ESXi host bimini04) and on the datastore DS-Cloud-02 addressed via the vCD Storage Policy SP-Cloud-02.
The move between the vSphere clusters is carried out using vCD, no interaction to vCenter Server.
These are the necessary steps:
- Change the VM-11 Storage policy in vCD from “SP-Cloud-02”
To the shared Storage Policy “SP-Cloud-Shared-01”.
This will initiate a vCenter Server Storage vMotion and the VM will be placed on the datastore, in my case DS-Cloud-Shared-01, reachable by both vSphere clusters.
In vCD you can now verify that the VM is located on the DS-Cloud-Shared-01 datastore using Storage Policy SP-Cloud-Shared-01 and still runs on ESXi host bimini04.
- Initiate a vMotion operation for the VM from within vCD by right-click the VM and select “Migrate To”.
You will only find this menu option from the System section of vCD. Select System -> vSphere Resources -> Resource Pools -> VCDX56-02-VCD02 (vSphere cluster where the VM is located)
- Select the destination Resource pool, vSphere cluster in my case, VCDX56-01-VCD01.
vCD shows that the VM is placed on an ESXi host, bimini01, in vSphere cluster VCDX56-02-VCD01.
- The last thing you need to do now is to initiate a new storage vMotion by changing the destination Storage Policy, SP-Cloud-01.
When this task is completed you have moved the VM, VM-11, from:
- vSphere cluster:
VCDX56-02-VCD02 to VCDX56-02-VCD01 - vSphere Datastore:
DS-Cloud-02 to DS-Cloud-01 via DS-Cloud-Shared-01 - vCD Storage Policy:
Sp-Cloud-02 to SP-Cloud-01 via SP-Cloud-Shared-01
When changing storage policy you’ll receive an error saying “This VM has a compliance failure against its Storage Profile”
This is because the it takes some time for the storage policy to change for the VM in vCenter Server, actually the time it takes for the storage vMotion to complete. Verify that the storage profile has change on the vCenter Server VM level and you can safely clear this VM specific error message in vCD.
13 pings
Skip to comment form ↓
Move vCloud Director based VM between vSphere clusters | tushartopale
January 9, 2014 at 7:28 pm (UTC 0) Link to this comment
[…] Move vCloud Director based VM between vSphere clusters. […]