Friday 28 December 2012

Installing vCloud Director 5.1.1

Home Lab Components
  
1. One vCenter 5.0 U1
2. Two ESXi 5.0 U1 hosts joined in one Cluster (Full-DRS and HA) 
3. SQL Express 2008 R2 which is installed on vCenter Server as part of its installation 
4. Windows 2008 R2 x64 AD/DNS Server 
5. RHEL 6.2 x64 Server for vCD 


Installation Steps

1. Configure Database


Two parameters should be tuned for the DB Server to be used with vCD (whether you are using MSSQL or SQL Express).

a. Use Mixed Mode Authentication in SQL Server (vCD can't use windows authentication to connect to SQL DB. It won't work !!).


1. Start SQL Server Management Studio.
2. Right-Click on SQL Instance > Properties > Security > SQL Server and Windows Authentication Mode.
b. Configure SQL Server to use TCP port 1433 for DB connections.


1. Navigate to Start > All Programs > Microsoft SQL Server 2008 R2 > Configuration Tools > SQL Server Configuration Manager.
2. Expand SQL Server Network Configuration and select Protocols for #DB-Instance-Name#.
3. Right-Click on TCP/IP and Select IP Addresses Tab
4. Browse down to IPALL section. There you need to make sure that TCP Dynamic Ports is Blank and TCP Port is 1433.

Once this tuning is completed, you need to create a new database to be used by vCD. Run the following scripts in SQL Server Management Studio to create the new database with all required permissions and parameters.

Create Database

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

PS: The values shown for SIZE are suggestions

Set Transaction Isolation Level to READ_COMMITTED_SNAPSHOT

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

Create DB User Account

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 Proper Permissions to User

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

2. Create SSL Certificates


This step should come after installing RHEL 6.2 x64 which isn't covered here. Just to highlight that RHEL Network Adapter should be configured to have MS AD server as its DNS server.

Before showing the steps, we need to understand the difference between vCD HTTP Service and Console Proxy Service. vCD admins and endusers are connecting to vCD Portal using HTTP Service. However, when they are trying to console to any of the VMs, they will start using Console Proxy Service. This is similar to MKS connections used by vCenter to console to the VMs.  Therefore, vCD should have two separate IPs for those two services (usually provided using two NICs or using IP Alias).

PS: In case of two separate NICs, they can be in the same subnet since Linux allow NICs in same subnets unlike Windows.

On the other hand vCD is using SSL tunneling to secure all communications between clients and servers (either vCD Portal or VMs Consoles). For this reason, two SSL certificates are required one for each IP. You can import signed certificates or create self-signed ones.

To create self-signed certificates on RHEL server which will be used by vCD:

Note: Your RHEL vCD server should be having a supported version of Java (5 or higher). Therefore, its always recommended to use RHEL versions listed by VMware HCL document since they will have supported Java versions by default.

3. Install vShield Manager

To start with, you need to download vShield Manager OVA template which can be download from VMware website.

Once the deployment is completed, you need to login to the VA using CLI default account to configure Management Network Settings.

1. Login using username: admin/password: default. 
2. Type enable and use password: default. 
3. Type Setup to start configuring basic networking settings.

Once management network is ready, use web-access to connect to vShield Manager (https://#IPADDR#). The first step is to attach vShield Manager with vCenter Server. Next step will be registering vShield Plugin with vSphere to start accessing vShield Manager using vSphere Client.

From there you start configuring basic settings including DNS, NTP, Time Zone, Logging, Backup, Users/Privileges, etc.

4. Install vCloud Director Software

a. In your MS AD (which is your MS DNS server as well), create new A pointer for vCD server hostname and create PTR record for vCD server IP. Without having AD pointers, vCD portal will show blank gray screen when trying to browse it. 
b. Copy vCD software file to RHEL server which will be used as vCD 
c. Apply execute permissions to vCD software file using the command chmod u+x installation-file 
d. Run the installation file using the command ./installation-file.
During my installation, I was missing libXdmcp package on RHEL box which is a dependency for vCD installation to proceed. First download the package libXdmcp-1.0.3-1.el6.x86_64.rpm, copy it to RHEL server, finally run the command rpm -ivh libXdmcp-1.0.3-1.el6.x86_64.rpm. After installing this package, re-run vCD installation.
e. After successful installation, run the configuration script to configure network and database connections. You can run this script later as well using the command  /opt/vmware/vcloud-director/bin/configure.
I faced another issue where windows firewall was running on my SQL server which prevented DB connection from vCD to establish. Corrected this by adding firewall rule to allow.
f. You need to login to vCD portal using the URL https://#vCD-IP#.

No comments:

Post a Comment