vCloud Director 1.5: Setup Guide

I am very new to vCloud Director and in such have a hard time learning how to install this.  I have to rely on reading the installation guide but this cannot beat anything that have been written by someone who have gone through the installation and listed down some of the requirements.  This was all done in my home lab in such, the FQDN here may not apply for production case.

I am no linux nor oracle expert so I am going to stick most of my work on Windows wherever possible.  As vCD has released to 1.5 that comes with SQL support, I am lucky that I can drop oracle completely.  As for the requirement for linux, I have used RHEL 5.5. Do not that RHEL is supported for 5.4, 5.5 and 5.6 also know as RHEL 5 update 4 to update 6.

Here are some of the reference I used to get my vCloud Director working.
Installation of vCD on RHEL (vCloud Director 1.5 Installation Guide, Pg 26-17)
Installing vCloud Director 1.5 on SQL 2008 (vCloud Director 1.5 Installation Guide, Pg 16)

For those who wants to do on Oracle database you can refer to this link.  This is done on Oracle express not the full enterprise database which is suitable for those doing POC or in their home lab.


The high level steps would be as follows:
  1. Prepare Database
  2. Create certificates
  3. Import vShield Manager from .ovf and configure IP, subnet, DNS
  4. Install RabbitMQ
  5. Download and install VMware public key
  6. Install vCD binary in RHEL
  7. Configure vCD with database
  8. Prepare sysprep file on vCD server

1. Prepare SQL 2008 R2 database with user (vCloud Director 1.5 Installation Guide, Pg16-17)

Create Database Instance
USE [master]
GO
CREATE DATABASE [vcd01] ON PRIMARY
(NAME = N'vcd01', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.VMWSQL\MSSQL\DATA\vcd01.mdf', SIZE = 100MB, FILEGROWTH = 10% )
LOG ON
(NAME = N'vcd01_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.VMWSQL\MSSQL\DATA\vcd01.ldf', SIZE = 1MB, FILEGROWTH = 10%)
COLLATE Latin1_General_CS_AS
GO

Set database to READ_COMMIT_SNAPSHOT
USE [vcd-01]
GO
ALTER DATABASE [vcd01] SET RECOVERY SIMPLE;  /*OPTIONAL: Recommended. Seek advise from DBA*/
ALTER DATABASE [vcd01] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [vcd01] SET ALLOW_SNAPSHOT_ISOLATION ON;
EXEC sp_addextendedproperty @name = N'ALLOW_SNAPSHOT_ISOLATION', @value = 'ON';
ALTER DATABASE [vcd01] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;
EXEC sp_addextendedproperty @name = N'READ_COMMITTED_SNAPSHOT', @value = 'ON';
ALTER DATABASE [vcd01] SET MULTI_USER;
GO


Create DB account, vcdmgr
USE [vcd01]
GO
CREATE LOGIN [vcdmgr] WITH PASSWORD = 'password', DEFAULT_DATABASE =[vcd01],
   DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF
GO
CREATE USER [vcdmgr] for LOGIN [vcdmgr]
GO

Assign role to vCD DB
USE [vcd01]
GO
sp_addrolemember [db_owner], [vcdmgr]
GO


2. Create certificates (vCloud Director 1.5 Installation Guide, Pg 18-21)
In RHEL, use the terminal windows and follow the instruction in the installation guide.
Make sure your Java version is 1.6 as stated in this KB.

The path of the java in vCloud Director should be as follows which is mistype in the KB.

"/opt/vmware/vcloud-director/jre/bin/"

You would need to run the keytool command with the above path if your Java version is other than 1.6.

2.1 To create an untrusted certificate for HTTP service 
> keytool -keystore certificates.ks -storetype JCEKS -storepass passwd -genkey -keyalg RSA -alias http 

Enter the First and Last name the FQDN associated with the IP of the HTTP service.

Note: In case you create with mistake and needed to delete type
> keytool -delete -keystore certificates.ks -storetype JCEKS -storepass passwd -alias http

2.2 Create a certificate signing request for the HTTP service.
> keytool -keystore certificates.ks -storetype JCEKS -storepass passwd -certreq -alias http - file http.csr 

2.3 Create an untrusted certificate for control proxy service
>keytool -keystore certificates.ks -storetype JCEKS -storepass passwd -genkey -keyalg RSA - alias consoleproxy 

Enter the First and Last name the FQDN associated with the IP of the console proxy service.

2.4 Create a certificate signing request for the console proxy service.
> keytool -keystore certificates.ks -storetype JCEKS -storepass passwd -certreq -alias consoleproxy -file consoleproxy.csr

2.5 Send signing certificates requests to Certification Authority
If you have self signed certificates to import, please follow the KB.

In our case, we will only verify that all the certificates have been imported, list the contents of the keystore file with the command:

> keytool -storetype JCEKS -storepass passwd -keystore certificates.ks -list

 Note: By default, certificates are valid only for 3 months. To increase the duration, add the switch -validity when creating your certificate.


3. Import vShield Manager and configure it (vCloud Director 1.5 Installation Guide, Pg 21-22)
This is pretty straight forward so you can refer to the installation guide.
default id: admin
default password: default


4. Install RabbitMQ (vCloud Director 1.5 Installation Guide, Pg 22)
Go to http://www.rabbitmq.com/ to download the RabbitMQ server.  It recommended for Windows although there are packages for Linux as well.

When install RabbitMQ server in Windows, it will request to install Erlang package.  This is a prerequisite.  So you would need this server to have access to internet else you can go here to download the package in advance.

You can install this on any server.  Do note that all vCloud Director cell must be able to reach the RabbitMQ server.

We will have to follow up this section if message need to be encrypted.


5. Download and install VMware public key (vCloud Director 1.5 Installation Guide, Pg 23)
Go to http://packages.vmware.com/tools/keys

Copy all the keys to the keystore where you place the certificates.  And run the following command on every key.
> rpm --import path\key_file


6. Install vCD binary in RHEL (vCloud Director 1.5 Installation Guide, pg 26-27)
In RHEL, open the terminal windows and type the command> chmod u+x installation-file




7. Configure vCD with database (vCloud Director 1.5 Installation Guide, pg 27-31)
To start the configuration we will type the command.
> /opt/vmware/vcloud-director/bin/configure

Note: in vCloud Director 1.0 the path is /opt/vmware/cloud-director/bin/configure
IMPORTANT: Make sure Windows firewall is turn off in my video I have to troubleshoot it to realize it turn on!

 
Update: I missed out the sysprep package importing as part of the installation.


8. Prepare sysprep file on vCD server (vCloud Director 1.5 Installation Guide, pg 32-33)
After everything is running, we need to prepare the sysprep file on the vCD server.
The table in the installation guide is show as below.  Refer to the KB here for a video demonstration.

Guest OS
Copy Destination
Windows 2000
ysprepBinariesDirectory /win2000
Windows 2003 (32-bit)
SysprepBinariesDirectory /win2k3
Windows 2003 (64-bit)
SysprepBinariesDirectory /win2k3_64
Windows XP (32-bit)
SysprepBinariesDirectory /winxp
Windows XP (64-bit)
SysprepBinariesDirectory /winxp_64

>/opt/vmware/vcloud-director/deploymentPackageCreator/createSysprepPackage.sh 
SysprepBinariesDirectory

Where SysprepBinariesDirectory is the Directory you place your sysprep files to be used by vCD.  In my case I place make a folder named “Sysprep” and place the respective Guest OS sysprep files in the folder naming convention required as shown in the table above.

Example:
 >/opt/vmware/vcloud-director/deploymentPackageCreator/createSysprepPackage.sh 
/root/Desktop/sysprep/

A cab file will be created in the following path, you will need to copy this file to the additional vCD servers that you have.

/opt/vmware/vcloud-director/guestcustomization/windows_deployment_package_sysprep.cab

After the cab package is created, you have to restart the vCD service
> service vmware-vcd restart

Comments

Ron said…
Hi KiOng;

In Step 1. Prepare SQL 2008 R2 Database you reference a couple of SQL Statements that are currently not in the Installation Guide I downloaded from VMware (Pg16-17).

The 2 Storage Procedure (SP) statements I'm referring to are as follows:

EXEC sp_addextendedproperty @name = N'ALLOW_SNAPSHOT_ISOLATION', @value = 'ON';

EXEC sp_addextendedproperty @name = N'READ_COMMITTED_SNAPSHOT', @value = 'ON';

These statements modify/configure the vCloud Database Properties.

Are these "optional" statements as well?

Were they recommended or validated by VMware?

Thx for your attention and help in this matter.
Wee Kiong Tan said…
In the installation guide there is
LTER DATABASE [vcloud] SET ALLOW_SNAPSHOT_ISOLATION ON;
ALTER DATABASE [vcloud] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;

However this does not get registered. The replacement statement is

EXEC sp_addextendedproperty @name = N'ALLOW_SNAPSHOT_ISOLATION', @value = 'ON';

EXEC sp_addextendedproperty @name = N'READ_COMMITTED_SNAPSHOT', @value = 'ON';

as my post stated i referred to this post http://kendrickcoleman.com/index.php?/Tech-Blog/installing-vcloud-director-15-with-sql-server-2008.html

where the blogger corrected this statements.

If you use the default statements, you will not see it create in the database properties.
Ajay said…
Hello ,

I am having some problem getting the vcloud interface(webpage). I have configured all the things as suggested by vmware documentation. After the successfull installation of vCD ,when i try to do nmap vcd.vmlab.net it doesn't show me the ports 443 and 80 open. Please help

Thanks
Ajay
Wee Kiong Tan said…
Ajay,
Please log a case with VMware support. It will not be possible to assist you as I do not know what have you done and do not have the tools which VMware support will be able to assist you on.

Popular posts from this blog

VMware by Broadcom, A New Chapter Forward

VMware vExpert 2024 Application is Now Open!

VMware vCenter Server High Availability (VCHA)