Skip links

vCloud Director 9.5 MSSQL DB Setup

I set up a lab to work through the procedure of a forthcoming migration from vCloud Director 9.5 to vCloud Director 10. Daniel Pauluszek has published an article regarding the different migration options to vCD 10 depending on your starting point. In my case I want to migrate from a vCD 9.5 Linux Cell and an External Microsoft SQL Database. The target architecture will be a vCloud Director 10 Appliance with embedded postgres Database.

This post is the first in my setting up the source lab and deals with the setup of the MSSQL DB for the 9.5 environment. Subsequent posts will show the migration.

Whilst not many people will set up an old vCD 9.5 environment anymore using MSSQL (it is not a supported DB with vCD 10) I wanted to record it for future reference. The official documentation regarding setting up an MSSQL DB for vCD is found here

Procedure

First I set up a Windows 2012 Server with MSSQL 2017. As this is a lab the specification was much lower than what would be required in production. I used 2vCPU and 4GB RAM.

Using MSSQL Studio log into the MSSQL Instance and run each of the following queries to create the vcloud DB instance and set the required permissions.

Create DB Instance in the required location.

The below script creates a DB and logs with the name vcloud on the c drive of the SQL server.

USE [master] GO CREATE DATABASE [vcloud] ON PRIMARY (NAME = N'vcloud', FILENAME = N'C:\vcloud.mdf', SIZE = 100MB, FILEGROWTH = 10% ) LOG ON (NAME = N'vcdb_log', FILENAME = N'C:\vcloud.ldf', SIZE = 1MB, FILEGROWTH = 10%) COLLATE Latin1_General_CS_AS GO

Again as this is a lab I went with the default sizes in the script. In the real world it is likely that you would use larger sizing and locate the DB and logs on different disks.

Set transaction isolation level

USE [vcloud] GO ALTER DATABASE [vcloud] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; ALTER DATABASE [vcloud] SET ALLOW_SNAPSHOT_ISOLATION ON; ALTER DATABASE [vcloud] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT; ALTER DATABASE [vcloud] SET MULTI_USER; GO

Set the database user account and password

Here the user is vcloud and the password is vcloudpass. These details will be required later when we connect the vCD cell(s) to the database.

USE [vcloud] GO CREATE LOGIN [vcloud] WITH PASSWORD = 'vcloudpass', DEFAULT_DATABASE =[vcloud], DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF GO CREATE USER [vcloud] for LOGIN [vcloud] GO 

Assign permissions to the database account (created above)

The final step is to give the vcloud account the db_owner role.

USE [vcloud] GO sp_addrolemember [db_owner], [vcloud] GO

As the database is running on the standard port of 1433 it is required to add a rule to Windows firewall to allow access from the vCD cells. In my lab case I turned the firewall off altogether

In the next part I will create the Linux vCD Cell using Cent OS 7 and install and configure vCD.

Leave a Comment