«

»

Move vCloud Director based VM between vSphere clusters

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:
Screen Shot 2013-12-17 at 07.44.27

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.
Screen Shot 2013-12-06 at 07.59.54

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.Screen Shot 2013-12-06 at 08.38.46

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:
Screen Shot 2013-12-06 at 08.22.17

The Org vDC has access to the same datastores as the PvDC:
Screen Shot 2013-12-06 at 08.25.22

The VM i wanted to move is called VM-11.
Screen Shot 2013-12-06 at 08.59.00
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.
Screen Shot 2013-12-15 at 09.56.16

The move between the vSphere clusters is carried out using vCD, no interaction to vCenter Server.

These are the necessary steps:

  1. Change the VM-11 Storage policy in vCD from “SP-Cloud-02”
    Screen Shot 2013-12-15 at 09.41.01
    To the shared Storage Policy “SP-Cloud-Shared-01”.
    Screen Shot 2013-12-06 at 09.02.54
    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.
    Screen Shot 2013-12-15 at 09.46.13
  2. 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)
    Screen Shot 2013-12-14 at 09.45.02
  3. Select the destination Resource pool, vSphere cluster in my case, VCDX56-01-VCD01.
    Screen Shot 2013-12-06 at 09.05.56
    vCD shows that the VM is placed on an ESXi host, bimini01, in vSphere cluster VCDX56-02-VCD01.
    Screen Shot 2013-12-15 at 09.48.12
  4. The last thing you need to do now is to initiate a new storage vMotion by changing the destination Storage Policy, SP-Cloud-01.
    Screen Shot 2013-12-15 at 09.42.18

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-01Screen Shot 2013-12-15 at 20.35.39

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.
Screen Shot 2013-12-06 at 09.22.31

Screen Shot 2013-12-06 at 09.27.34

13 pings

Skip to comment form

  1. Move vCloud Director based VM between vSphere clusters | tushartopale

    […] Move vCloud Director based VM between vSphere clusters. […]

Comments have been disabled.