/vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3

vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3


This blog post vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3 is the third and final part of my blog post series about vCloud Director migrations.

In the first part, I migrated a Linux vCD with an external SQL Server DB to a Linux vCD with an embedded PostgresSQL DB. I migrated from a Linux vCD with external SQL DB directly to vCD Appliance in the second part.

In this vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3, I will migrate the same Linux vCD with embedded PostgresSQL DB (migrated in the first part) directly to a vCloud Director Appliance. Even though it seems simple(after we know how to do it), migrating from a PostgresSQL DB in a Linux vCD to a vCD Appliance (that also has a PostgresSQL DB) is not just a DB backup a restore.

This is the source environment:

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

Destination source environment(after upgrade and migration):

  • vCloud Director 10.x Appliance
    • 2 vNIC with 2 IPs
      • IP1: 192.168.1.110/24 – Used for HTTP and Console Access
      • IP2: 192.168.2.110/24 – Used for DB
  • vCenter / vSphere 6.7
  • NSX-V 6.4.8

As I stated before, I will not go through the deployment of a new vCloud Director Appliance since there are already many articles about deploying a vCD Appliance. So I will only focus this blog post on the migration between Linux vCD and the vCD Appliance.

I will assume that you already have fully deployed your new vCloud Director Appliance to where you need to migrate your Linux vCloud Director. Before I start, I will check my vCD to check if I have the same version and build.

vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3

As we can see above, there is a difference in the version/builds. Since I am using a previous vCD Appliance that I installed before, the build is older, and also time zone is different.

In this last article about vCloud Migrations, I show quick steps on how to upgrade both Linux vCloud Director and vCloud Appliance.

My first task here is to upgrade both to the latest vCD 10.2 build and fix the time zone for both vCD. Downloaded the latest vCD version build 10.2.2

vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3

Note: Don’t forget to first create a backup, or a VM snapshot of your vCD, before starting the upgrade.

Start vCloud Director Upgrade Process.

Note: As I did in previous articles in this series 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 PostgresSQL DB) and Destination vCD Appliance (as the new vCD Appliance that you did install)

1. Upload the file to each vCD, stop vCD and run the upgrade.

In Source Linux vCD.

In Destination vCD Appliance.

Note: After you upgrade vCD Appliance ssh access could be disable. Login to vCD VM console and run: /opt/vmware/appliance/bin/enable_root_login.sh to enable back ssh access.

2. Then upgrade DB.

3. Now import all your NSX certificates after upgrading your vCloud Director to 10.x(in this case, only in the Linux vCD, since vCD Appliance is a new installation and has no resources).

4. Next, login Linux vCloud Director and Service Provider Admin Portal UI vCenter Server and NSX instance, and reenter the credentials while accepting the certificate.

vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3

Since I only have an NSX-V in this Linux vCD and no NSX-T, I do not need to reconnect the NSX. Reconnecting vCenter will take care of the NSX-V connection and certificates also.

Note: Since the new vCD Appliance is empty no need to do this in the new vCloud Appliance. But you can run it if you have already added a vCenter to it.

5. Changed time zone in the Appliance.

vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3

So that all configurations are set properly, I reboot both vCD login and check if all is ok. Both vCDs have the same version/build, and the time zone is time to start the migration.

Start Migration process.

Important Note: This is migration from a Linux vCloud Director with embedded PostgreSQL to a vCloud Director Appliance with an embedded PostgreSQL. In that case, the migration DB tool cannot be used here since that tool is only for external DB to an embedded PostgreSQL.

This type of migration needs to be done manually.

On Destination vCD Appliance

1. In the Destination vCD Appliance, create folders to backup files.

2. Copy your original files from the Destination vCD Appliance

On Source Linux vCD

Note: This next step is only needed if you are using Custom CA Signed Certificates on your source vCD. If you are using self-signed certificates, you can skip this step.

3. Create a folder on the Linux Source and copy file certificates.ks to it.

Note. Normalyy certificates.ks should by in the folder /opt/vmware/vcloud-director/ but in Linux CD it could be in  /opt/vmware/vcloud-director/jre/bin/ that his case.

4. Copy your original files from the Linux Source to Destination vCD Appliance

5. Shutdown all vApps/VMs in vCD and stop both vCD(Source and Destination).

vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3

On Source Linux vCD

6. Copy the file certificates.ks from the Linux Source to Destination Source (make sure your NFS Share folder is mounted).

7. Create a backup of vCD PostgreSQL DB and copy it to Destination vCD Appliance.

Note: Be aware of the DB size. Depending on the size of your DB, you may need to copy to another folder/Filesystem instead of /tmp folder. Now copy and send your PostgreSQL dump file to the new vCD Appliance.

On Destination vCD Appliance

8. Now login to the Destination vCD Appliance.

  1. Change the permissions on the dump file.
  2. Drop the existing vcloud DB from the initial vCD Appliance Deployment.
  3. Restore the vCD PostgreSQL DB backup created in the previous step.

9. Now replace the original configuration files on Destination vCD Appliance with the files copy from Source Linux CD to /SourceCerts .

After the copy, 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)

Note: This next step is only needed if you are using Custom CA Signed Certificates on your source vCD. If you are using self-signed certificates you can skip this step.

10. Copy certificates.ks copied in steps 3 and 6.

11. Next, run the configuration cell command.

12. Finally, import Certificates from vCenter and NSX-V or NSX-T to the new vCloud Director.

13. Start vCloud Director service.

Then check vCD Applications logs to check if they are starting properly.

All Applications and vCD Cells have started 100%.

Now Login to your vCD Service Provider Admin Portal with; https://eth0_IP_new_cell/provider. In my case is https://192.168.1.110/provider.    

Check if Organizations are in the new cloud director. Has we can see in the next image, the organization exists.

Open a  Tenant and Power ON some vApps and VMs, and all is working without any errors.

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

With these vCloud Director Migrations: Linux vCD to vCD Appliance – Part 3, I finish this vCloud Migrations series. I hope these 3 blog posts help you understand better the steps to these migrations. As I said in part 2, VMware documentation is a bit confused and unclear with the steps we need to do.

vCloud Director migrations series:

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

©2021 ProVirtualzone. All Rights Reserved
By | 2021-05-30T17:19:15+02:00 May 22nd, 2021|vCloud Director, VMware|0 Comments

About the Author:

I am over 20 years’ experience in the IT industry. Working with Virtualization for more than 10 years (mainly VMware). I am an MCP, VCP6.5-DCV, VMware vSAN Specialist, Veeam Vanguard 2018/2019, vExpert vSAN 2018/2019 and vExpert for the last 4 years. Specialties are Virtualization, Storage, and Virtual Backups. I am working for Elits a Swedish consulting company and allocated to a Swedish multinational networking and telecommunications company as a Teach Lead and acting as a Senior ICT Infrastructure Engineer. I am a blogger and owner of the blog ProVirtualzone.com

Leave a Reply

%d bloggers like this: