Database is very important component for vCloud Director. It works like vCenter server database and vCloud Director cells use a database to store shared information.
Note: Before start installing VDC this database must exist and configured for vCloud Director software.
Supported vCloud Director databases
vCloud Director supports Oracle and Microsoft SQL Server databases. The most current information about supported databases is available from the VMware Product Interoperability Matrixes. ( KB 2059451 )
First we will see how to install Microsoft SQL Server 2008 R2.
1. Download the SQL Server server setup from Microsoft Website.
Link to Download: https://www.microsoft.com/en-in/download/details.aspx?id=30438
2. You can use Separate Server for the database other than vCenter Server ( Never install SQL with vCenter Server )
3. Before that check the required component like .Net 4.0 version and install the same from Server Roles & Features
4. Run the Setup to start installing.
Accept the Agreement and Click next.
5. Select the Features here and click next.
6. It will go to Next option Installation Rules.
7. After that it will give you option for Instance Configuration, Here you have two options like Go with Default either Provide a Name as per your Organisation. ( I will go with Default )
8. It will give you details about Disk Space requirement.
9. Under Server Configuration it will give you Option to choose or Configure Service Account for SQL Services.
Note: User either Service account or Domain Account with Admin Rights.
10. vCloud Director will work with Mixed Mode Authentication only, it will NOT work with Windows Authentication.
Provide Password for sa account
11. Choose Error reporting if you wise to send logs to Microsoft.
12. After that it will start installing.
13. After Successfully installation you will get below screen.
14. To access SQL server so that you will be able to run or create user etc. You need Console Microsoft SQL Server Management Studio (SSMS). I am using 2016 Server.
Download it From Microsoft Website.
Link to download : https://msdn.microsoft.com/en-us/library/mt238290.aspx?f=255&MSPPError=-2147217396
15. Download it and start installing.
16. After installation Open the Console to access SQL Server.
17. Provide the SQL Server Name and Provide User name and password to login into database server.
Once you enter into Database Server Need to do Below Task.
Run these Commands in the SQL Query and Execute. ( https://pubs.vmware.com/vcd-51/index.jsp#com.vmware.vcloud.install.doc_51/GUID-C3C2E2DA-D760-413A-AA8A-A4BC674C068F.html )
Configure the database server.
A database server configured with 16GB of memory, 100GB storage, and 4 CPUs should be adequate for most vCloud Director clusters.
Specify Mixed Mode authentication during SQL Server setup.
Windows Authentication is not supported when using SQL Server with vCloud Director.
Create the database instance.
The following script creates the database and log files, specifying the proper collation sequence.
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%)
The values shown for SIZE are suggestions. You might need to use larger values.
Set the transaction isolation level.
The following script sets the database isolation level to READ_COMMITTED_SNAPSHOT.
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;
For more about transaction isolation, see http://msdn.microsoft.com/en-us/library/ms173763.aspx.
Create the vCloud Director database user account.
The following script creates database user name vcloud with password vcloudpass.
CREATE LOGIN [vcloud] WITH PASSWORD = ‘vcloudpass’, DEFAULT_DATABASE =[vcloud],
DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF
CREATE USER [vcloud] for LOGIN [vcloud] – Provide Password as per your organisation Standard.
Assign permissions to the vCloud Director database user account.
The following script assigns the db_owner role to the database user created in Step 5.
sp_addrolemember [db_owner], [vcloud]
Under Database settings you will be able to see vcloud database.