In the previous article we talked a little bit about why we need vCenter and what are the requirements for installing vCenter Server version 5. In this article, we will go through the installation process including vCenter Server database configuration in Microsoft SQL server 2008 R2.
For my lab, I decided to have a dedicated SQL server where I will host the database, in other words my vCenter database will be hosted on a remote SQL server. When we’re doing very large vSphere deployment, it is recommended to use a separate database for vCenter due to obvious performance reasons. My SQL server and vCenter server are going to be running on a Windows Server 2008 R2 VMs. There’s been a lot of discussions as to whether to host the vCenter server on a VM or on a physical server. Personally I like being able to virtualize the server to take advantage of the features that are available in vCenter.
Lets begin by configuring the vCenter database.
1. Connect to the SQL server and open SQL Server Management Studio with either Windows Authentication or SA account.
2. Once logged in, Right Click on Database and select “New Database…“
3. In the Database name, type the name of the database, I chose to use VCDB as my database name
4. Now we’re going to create an account to use for when we’re setting up the ODBC connection. We are also going to grant this SQL server account access to the VCDB database we just created. To start, simply navigate to Security on the left hand side, right click on Logins under Security and select “New Login…“
5. In the Login Name you’ll need to type the name of the SQL account. I used vcuser. For authentication, I chose to use SQL Server Authentication and I disabled the Enforce password policy, Enforce password expiration, and User must change password at next logon. Since this is going to be like a SQL server service account for the VCDB database, these options are not required
6. Under User Mapping page, we’ll need to select VCDB/msdb and grant the vcuser “db_owner” on the databases
7. Another setting that we’ll need to add is the dbo object on both VCDB and msdb databases by clicking on … button and adding the dbo object
Now we are going to create an ODBC connection on the vCenter server. If you’re going to be using Microsoft SQL Server 2008 R2, you’ll need to install the Microsoft SQL Server 2008 Native Client on the vCenter server. This can be found here / VMware KB. Once you install the native client, we can proceed with the ODBC creation.
1. Navigate to Control Panel -> System and Security -> Administrative Tools and Open Data Sources (ODBC). Under System DSN select SQL Server Native Client 10.0. With vSphere 5, we can use 64bit ODBC connections
2. Type the name of the ODBC connection, I normally use the database name and select the SQL server that is hosting the database
3. Select SQL server Authentication and type the user name and password of the account we created earlier and click Next ->
4. Change the default database to VCDB and click Next -> and then finish and that will create an ODBC connection
Now we’ll begin the vCenter Server 5 installation. Mount the DVD and begin the install.
1. Once the DVD is mounted and the installer is launched, we’ll be presented with the VMware vSphere 5.0 installation screen where we have a number of options. For the purposes of installing vCenter, we’ll select vCenter Server and click Install. Make sure to have Microsoft .Net Framework 3.5 SP1 and Windows Installer 4.5 installed.
2. Click Next -> at the vCenter Server installation wizard
3. Type the username along with Organization and License Key and click next
4. At the Database options, select Use an existing supported database and chose VCDB (MS SQL) as the DSN. One thing to be careful with is when you initially create the database, it will be set to Full as a recovery model which will generate transaction logs which could cause the server to run out of space if there’s no maintenance plan in place to truncate the transaction logs. In my lab I use the Basic recovery model, for production, you should use what ever is best for you so plan accordingly.
5. Type the username and password of the SQL server account we created earlier and click Next ->
6. You can chose to use a System account to run the vCenter service or use a domain account
7. Leave the default Destination Folder paths or change if you need to
8. Configure the ports if necessary or leave as defaults which is what I usually do
9. Same thing for Inventory Service ports
10. Finally click on Install and that should get vCenter server installed
Hopefully the installation completes successfully and you’re now able to begin setting up the cluster along with all the great features vCenter has to offer.