How to Migrate Your CF from One vSphere Cluster to Another

Recently, one of our clients had to migrate their CF from one vSphere cluster to another. Here is the story: the client bought some more modern UCS chassis they would like to add to the existing cluster. Enhanced vMotion Compatibility (EVC) must be enabled to support mixed processors in the same cluster. You can't enable EVC if there is a single VM is on it. In order to enable EVC feature, they need to migrate the whole CF to a new cluster. Since it is a heavily used CF environment, they would like zero or minimum downtime for the migration.

The solution should have been simple since vSphere has the vMotion feature. The steps we came up with are: disable bosh resurrection, create a new cluster in the same vCenter, vMotion the CF VMs to the new cluster, enable EVC in the old cluster, vMotion the CF back to the old cluster, enable Bosh resurrection. Zero downtime and no user should have noticed that we migrated CF between two clusters.

Small challenges happened when we found out that we can't vMotion between the two clusters when VMs are running due to the CPU compatibility issues between the two clusters. (More details see vMotion between vSphere Clusters). This means we have to power off CF VMs before we can do vMotion, which means possible downtime for the platform. 

Given the situation, we came up with the following working solution:

1) Turn off BOSH resurrection, otherwise BOSH will try to self-recover/recreate your VMs that are down when you try to migrate.

2) Run bosh stop on a subgroup of the VMs so there were still same type VMs running to keep the platform working. bosh stop without --hard flag by default will stop VM while keeping the persistent disk.

3) Power off those VMs to do vMotion to the new cluster we created beforehand.

4) After vMotion, bring the VMs in the new cluster up.

5) Repeat the above process until you migrate all the VMs over to the new cluster

6) Delete or rename the old cluster.

7) Rename the new cluster to the old cluster's name.

8) Turn the BOSH resurrection back on.

要查看或添加评论,请登录

Xiujiao Gao的更多文章

  • CF 上传应用: 下载失败错误ERR Downloading Failed

    CF 上传应用: 下载失败错误ERR Downloading Failed

    What you easily see are usually consequences or symptoms, but not the root cause. 现象和后果总是显而易见,根本原因总待人上下而求索。 "The Dev…

  • CF Push App: ERR Downloading Failed

    CF Push App: ERR Downloading Failed

    What you easily see are usually consequences or symptoms, but not the root cause. "The Dev environment is down!!!" We…

  • Default Password for BOSH VMs

    Default Password for BOSH VMs

    The default username for BOSH VMs is vcap. We have two options when comes to the vcap password for BOSH and VMs that…

  • Migrate BOSH/Cloud Foundry (CF) Disks from vSphere Datastore(s) to Different Ones

    Migrate BOSH/Cloud Foundry (CF) Disks from vSphere Datastore(s) to Different Ones

    Migrating disks for BOSH and Cloud Foundry (CF) VMs from the current datastore(s) to new datastore(s) can be painless…

  • BOSH Director and CF VMs Time Drift

    BOSH Director and CF VMs Time Drift

    When the time on BOSH director and CF VMs such as cells are off, it may throw off some of your applications with…

  • Configure UAA in CF with SAML as A Service Provider

    Configure UAA in CF with SAML as A Service Provider

    Before we start going through how to configure UAA in CF with SAML as a Service Provider, let's make sure we have…

  • Deploy HA CF with Anti-Affinity DRS Rules in vSphere

    Deploy HA CF with Anti-Affinity DRS Rules in vSphere

    VM-VM Affinity Rules vSphere Vm-VM Affinity Rules specify whether selected individual VMs should run on the same host…

  • A Handy S3 CLI

    A Handy S3 CLI

    Do you ever get annoyed that you have to install Python, pip, and then AWS CLI in order to simply access your S3…

  • Bootstrap BOSH2 with local VirtualBox

    Bootstrap BOSH2 with local VirtualBox

    Do you feel a little bit disappointed when you can not simply run vagrant up to bring up a bosh-lite on your local…

  • Running Cloud Foundry with bosh2 on VirtualBox

    Running Cloud Foundry with bosh2 on VirtualBox

    If you do not have a BOSH-Lite installed with bosh2 locally on your VirtualBox yet, you can follow BOSH-Lite on…

社区洞察

其他会员也浏览了