Wednesday, September 19, 2012

Deploying a VMware vCloud Director (vCD) 5.1 virtual appliance with MS SQL backend

This is a guide for deploying vCloud in a LAB environment, these settings are not the most secure or performant, but this should get you up and running with vCloud 5.1 so you can test and learn it. The easiest way is with the appliance, you don’t need to use a MS SQL DB, but occasionally I need to crack open the DB and I am the most comfortable with that technology.

  1. My Assumptions about what you already have:
    1. One ESXi Host with the following VM’s on it.
      1. Windows with MS SQL DB (I’m using MS SQL 2008 R2)
      2. vShield Manager 5.1 with an IP set (also known as vCloud Networking and Security 5.1)
      3. vSphere 5.1 vCenter (can be the appliance)
      4. Available resources to Deploy vCloud Director Appliance
    2. VCP or equivalent level of knowledge
  2. Prepare your Database (same steps as with non-appliance) 
    1. Again, I am assuming you have MS SQL 2008R2 installed, without a local firewall, or ports opened.
    2. This is a great article, follow it, I will paste the highlights from it below, you can copy/paste these commands into SQL Query analyzer!!

    1)    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. (this is for production level quality)
    2)    Specify Mixed Mode authentication during SQL Server setup.
    Windows Authentication is not supported when using SQL Server with vCloud Director.
    3)    Create the database instance.
    The following script creates the database and log files, specifying the proper collation sequence.

    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

    The values shown for SIZE are suggestions. You might need to use larger values.
    4)    Set the transaction isolation level.
    The following script sets the database 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

    For more about transaction isolation, see http://msdn.microsoft.com/en-us/library/ms173763.aspx.

    5)    Create the vCloud Director database user account.
    The following script creates database user name vcloud with password vcloudpass.

    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

    6)    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.

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

     

  3. Deploy and configure vCloud virtual appliance
    1. Login to vCenter with vSphere client
    2. Click on File/Deploy OVF template, choose vCloud-Director-VA-T2-5.1.0.0-817173_OVF10.ova
    3. After you choose the obvious options, you should get a properties page to fill out like below
    4. image
    5. image
    6. Fill in the options
    7. Scroll Down, Fill in Database Name, vcloud if you used my info above
    8. Fill out Networking Properties (or leave blank for DHCP)
    9. After the standard deploy progress bar, you will see a long delay(5-10 minutes) during VM boot up while it sets up the DB, it’s not hung, just give it time.  It will occasionally ask questions, don’t answer them, just let it go..go get coffee..
    10. Eventually you should see a screen like this indicating that installation is finally complete:
    11. image
    12. Login to https://ipaddress:5480 admin/vmware if you need to configure the VM any further
    13. Login to https://ipaddress/cloud/ to begin configuring vCloud, but that will be my next blog post.(link soon)

Good Links:

vCloud Director 5.1 Release Notes

VMware vCloud Director 5.1 Documentation Center

VMware vCloud Directory Documentation

2 comments:

Unknown said...

What did you use for "Database name" and "Database Instance"

is that the SQL server name and database name?

or is truely the db name first and server instance name second ?

Kabeer Siddiqui said...

DATABASE instance of SQL server, if you install SQL instance with default(MSSQLSERVER)press enter to continue the cloud setup.