/vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2

vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2

In this vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2, I will migrate a Linux vCloud Director with an external SQL Server DB into a new vCloud Director Appliance with embedded Postgres DB.

Before I start, honestly, I would like that VMware could write documentation that easy to read and easy to follow. To do this migration process and the other migrations that I already have written about vCloud Director migrations, VMware has no proper documentation that you can follow all the steps without any doubts.

If any of the bloggers can write a step-by-step migrations process without any doubts, what are the steps, when, where, and how to do it, why VMware cant? That is my question.

If the first migration I have written is very straightforward, this migration and migrating from Linux vCloud Director with embedded Postgres DB to a vCloud Director Appliance are not. It needs extra steps, and some files need to be copied in a certain step, not before, not after.

I need to do many tests before I was able to this with success and without any post-migration issues in the new vCloud Director Appliance.

Also, I would like to thanks Marian Fischer for his tips and time to support me and put me on the right track to do this.

That been said, lets us start.

This is the source environment:

  • Linux CentOs 7
  • vCloud Director 9.7.0
    • 2 vNIC with 2 IPs
      • IP1: 192.168.1.114/24 – Used for HTTP and Console Access
      • IP2: 192.168.1.115/24 – Used for DB
  • vCenter / vSphere 6.7
  • NSX-V 6.4.8

Destination source environment(after upgrade and migration):

  • vCloud Director 9.7.0 Appliance

    • 2 vNIC with 2 IPs
      • IP1: 192.168.1.110/24 – Used for HTTP and Console Access
      • IP2: 192.168.2.210/24 – Used for DB
  • vCenter / vSphere 6.7
  • NSX-V 6.4.8

As I said, this is a Linux vCD 9.7, meaning that it can still support an external SQL Server DB, in vCD 10.x is not supported anymore. So if you upgrade the Linux vCD 9.7 to 10.x, was not able to use SQL Server DB anymore and needed to perform the migration in two steps.

Note: As we stated in my previous article, I will go through how to install vCD Appliance since there are many documentation and blog posts on how to do this.

How to migrate Step-by-Step.

Note: So that it is easy to identify the steps and area to do those steps/commands, I will refer to Source Linux vCD(vCD with External SQL DB) and Destination vCD Appliance (as the new vCD Appliance that you did install)

1. – Stop vCD cells in both vCDs

Source Linux vCD – stop vCD

Destination Appliance – stop vCD

2. – On Source Linux vCD, start migration DB from Source Linux vCD to Destination vCD Appliance.

First, try to migrate, ERROR.

Since I did a lot of tries and rollbacks, in this case, I forget to change Destination vCD Appliance to accept connections from Source Linux vCD.

How to do this?

In this Destination vCD Appliance, do the following steps.

Add the following line(s). Replace the IPs with your environment IP. You can add the network, or you can add the IPs from the Source Linux vCD. I add both networks.
host all all 192.168.1.0/24 md5
host all all 192.168.2.0/24 md5

Then cat the file pg_hba.conf and wait until pg_hba.d has added the new entries.

When the new entries are displayed, restart your migration by running migrate command again.

2. – On Source Linux vCD

DB was successfully migrated to the Destination vCD Appliance.

We need to backup and copy some files in Source Linux vCD and Destination vCD Appliance.

3. – In Destination vCD Appliance, create folders and backup files to it.

Files are: global.properties, responses.properties, truststore, certificates, proxycertificates, and certificates.ks

4. – In Source Linux vCD, copy the same files to Destination vCD Appliance (do not replace them for now).

We could copy directly to the destination folder, but I prefer to copy to a temporary folder and then replace the destination files with safety.

First backup the certificates.ks file. We will need this file later on.

Now copy files to destination using scp command.

Copy certificates.ks to transfer folder (in your previous vCD Appliance, make sure your NFS shared folder is mounted in /opt/vmware/vcloud-director/data/transfer)

5. – In Destination vCD Appliance, replace files with files copied from Source vCD Linux.

Just double-check files on the destination folder and check if all are own by vcloud:vcloud and date/time (to make sure files were copied and replaced)

Finally, copy certificates.ks 

Double-check the file in the destination folder if it was copied and had the proper permissions and ownership.

6. – After all files are copied and replaced is time to run the configurations cell command.

This command needs to be run with the exact parameters, or the configuration will fail.

Note: Keystore password needs to be the same as you have in Source Linux vCD (normally, the Keystore password is the root password used in the vCD install is saved with the firstboot).

If you can’t remember, you need to reset it in Source Linux vCD, restart the process, copy the file certificates.ks again from Source Linux vCD, and replace it in the Destination vCD Appliance.

Create a new Keystore password.

Run the configuration cell command.

Database configuration is complete, and now we can start the vCD service.

You can check the cell applications start with the log cell.log

When you see 100% complete and warning about the previous cell with the old IP, the system was migrated and configured with success.

7. – Now, we can open the vCD Appliance page, and we need to remove the old cell from the configuration.

Since this is vCloud Director 9.7 still uses the flash webpage version (using the beta html5 page will not have the option to remove the cells). We have a special VM with Windows 7 and an old Chrome to use flash pages in some of our old versions.

Login to vCloud Director

vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2

I double-check if my Organizations exist in the new vCD Appliance.

vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2

Next, go to Cloud Cells and remove the old Cell.

vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2

To make sure all was working ok, after a reboot, I login to one of the Organizations with Organization Local user and start some vApps to check if all was working.

With this last step, we have our Linux vCloud Director with an External SQL Server DB migrated to a new vCloud Director Appliance with embedded Postgres DB.

I hope this vCloud migration second part blog post vCloud Director Migrations: Linux vCD external SQL DB to vCD Appliance – Part 2 was useful for your migrations or upgrades on your vCloud Director infrastructures.

vCloud Director migrations series:

vCloud Director migrations series:

Share this article if you think it is worth sharing. If you have any questions regarding this type of migration, or comments, comment here or contact me on Twitter.

©2021 ProVirtualzone. All Rights Reserved
By | 2021-05-25T18:20:13+02:00 May 2nd, 2021|NSX, vCloud Director, VMware Posts, vSphere|0 Comments

About the Author:

I have over 20 years of experience in the IT industry. I have been working with Virtualization for more than 15 years (mainly VMware). I recently obtained certifications, including VCP DCV 2022, VCAP DCV Design 2023, and VCP Cloud 2023. Additionally, I have VCP6.5-DCV, VMware vSAN Specialist, vExpert vSAN, vExpert NSX, vExpert Cloud Provider for the last two years, and vExpert for the last 7 years and a old MCP. My specialties are Virtualization, Storage, and Virtual Backup. I am a Solutions Architect in the area VMware, Cloud and Backup / Storage. I am employed by ITQ, a VMware partner as a Senior Consultant. I am also a blogger and owner of the blog ProVirtualzone.com and recently book author.

Leave A Comment