One part that I forgot to mention that is in the vCloud Installation Guide is preparing your database server for use with vCloud Director. This isn’t a difficult process if you know how to use SQL. Because I decided to go with MS SQL with my vCloud 1.5 installation instead of Oracle, this article will focus on how to prep the MS SQL database; Although the Oracle prep work isn’t much different. Before we get started I would like to mention that we need to install SQL in Mixed Mode Authentication, so make sure to check that and set an “SA” user password during install.
Allowing remote TCP/IP connections to SQL
By default SQL 2008 R2 Express (like the others I assume) do not allow remote connections via TCP/IP, therefore we need to enable that before we can connect our vCloud Director Server to the database we will create later on. The simplest way I found do do this is from this article on the WebECS Support pages. It will take you through step by step on how to enable remote connections, but remember to restart SQL at the end because the changes won’t take affect until you do.
Creating a vCloud Database
The first step is to create our vCloud database, to do that we need to open up the Microsoft SQL Management Studio and login. After logging in click the “New Query” button below the File menu. Then paste the following query into the window, note there are several things you may want to change, including the “vcloud” user password as well as the database location, otherwise just paste in everything below:
CREATE DATABASE [vcloud] ON PRIMARY
(NAME = N'vcloud', FILENAME = N'C:\vcloud.mdf', SIZE = 100MB, FILEGROWTH = 10% )
(NAME = N'vcdb_log', FILENAME = N'C:\vcloud.ldf', SIZE = 1MB, FILEGROWTH = 10%)
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;
CREATE LOGIN [vcloud] WITH PASSWORD = 'vcl0ud', DEFAULT_DATABASE =[vcloud],
DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF
CREATE USER [vcloud] for LOGIN [vcloud]
sp_addrolemember [db_owner], [vcloud]
After pasting that in you should have something similar to this, and once you do click the “Execute” button right above the code in the ribbon bar.
You should now have a new user account called vcloud with a password of vcl0ud, and a new database called vcloud, unless of course you changed the parameters before executing. These queries also set the new vcloud database as the default database for the vcloud user, and it assigns that user the db_owner role.
We are now ready to connect up a vCloud Director server to our database… Check out the next part of this series to find out how to do the vCD install on a RedHat OS.