Book Image

Implementing VMware vCenter Server

By : Kostantin Kuminsky
Book Image

Implementing VMware vCenter Server

By: Kostantin Kuminsky

Overview of this book

Table of Contents (16 chapters)
Implementing VMware vCenter Server
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring a database for vCenter Server


In case you choose not to use the bundled database option for vCenter Server deployment, there are certain requirements and steps that need to be done to set up a database.

Using Microsoft SQL Server is the most common practice, and further on in this section, we will be assuming this database is used. More information on other supported databases—IBM DB2 and Oracle—can be found in the VMware vCenter Server documentation.

Microsoft SQL Server 2008 R2 Express can be used only as a bundled option for deployments with up to five hosts and 50 virtual machines. If you choose to use Microsoft SQL Server 2005 or Microsoft SQL Server 2008, make sure the machine has a valid ODBC DSN entry.

The first step is to create a database and user. This can be accomplished from Microsoft SQL Server Management Studio using the following script from /<installation directory>/vpx/dbschema/DB_and_schema_creation_scripts_MSSQL.txt:

use [master] 
go 
CREATE DATABASE [VCDB] ON PRIMARY 
(NAME = N'vcdb', FILENAME = N'C:\VCDB.mdf', SIZE = 2000KB, FILEGROWTH = 10% ) 
LOG ON 
(NAME = N'vcdb_log', FILENAME = N'C:\VCDB.ldf', SIZE = 1000KB, FILEGROWTH = 10%) 
COLLATE SQL_Latin1_General_CP1_CI_AS 
go
use VCDB 
go 
sp_addlogin @loginame=[vpxuser], @passwd=N'vpxuser!0', @defdb='VCDB', @deflanguage='us_english'
go 
ALTER LOGIN [vpxuser] WITH CHECK_POLICY = OFF 
go 
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
use MSDB
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go

Once the database and user have been created, the user needs to be assigned the db_owner role for the database.

The next step is to configure the ODBC connection. As described earlier, this can be done by navigating to Control Panel | Administrative Tools | Data Sources (ODBC).

For vCenter statistics to function properly, the remote SQL server needs TCP/IP to be enabled for the database. To accomplish this, perform the following steps:

  1. Navigate to Start | All Programs | Microsoft SQL Server | Configuration Tool and click on SQL Server Configuration Manager.

  2. Navigate to SQL Server Network Configuration | Protocols for Instance name.

  3. Enable the TCP/IP option.

  4. Click on TCP/IP Properties.

  5. In the Protocol tab, make the following entries:

    • Enabled: Yes

    • Listen All: Yes

    • Keep Alive: 30000

  6. In the IP Addresses tab, make the following selections:

    • Active: Yes

    • TCP Dynamic Ports: 0

  7. Restart the SQL Server service by navigating to SQL Server Configuration Manager | SQL Server Services.

  8. Start the SQL Server Browser service by navigating to SQL Server Configuration Manager | SQL Server Services.