ESX/ESXi: Install vCenter 5.0

by Kliment Andreev
0 comment
Reading Time: 7 minutes

In this post I’ll describe how I installed vCenter 5.0 on Windows 2008 R2 server using SQL 2008 R2 database. I’ve used two servers in my lab, one for the vCenter and the other one for the SQL. I won’t explain how to install SQL server, it’s fairly straightforward.

First thing to do is to create the SQL database. VMware provides a SQL script that you can execute to create the database. The script is on the vCenter installation DVD/ISO under source\vCenter-Server\dbschema folder where source is some drive letter (D:\ or E:\). This script does not work right, so we’ll use a modified version. By default, vCenter requires full db_owner rights so it can create some scheduled jobs. If your environment doesn’t allow this type of access, see the installation guide for vCenter. In this post, we’ll grant full db_owner rights for the sql user (vpxuser) to both vCenter database (VCDB) and the msdb system database. Once vCenter is up and running, you can remove the full db_owner rights from the msdb.

2014-01-10-21-51-16_01

Start the SQL Server Management Studio, log as the sa user or some domain user with full SQL admin rights, and click New Query.

2014-01-10-21-51-16_02

Copy and paste the following script, but change the file path where you want your database to reside. In my case it is C:\DATA. Also, change the password for the vpxuser that we will create.

2014-01-10-21-51-20_03

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

While in SQL Server Management Studio, expand the Security, then Logins. Double-click on the vpxuser and choose User Mapping. Select the VCDB database and put a check mark for db_owner. Put a check mark on the msdb database and do the same (check mark on db_owner).

2014-01-10-21-51-27_04

Next thing to do is to install the SQL Server Native Client on the vCenter server. It’s a free download from Microsoft. Once installed, go to Administrative Tools | Data Sources (ODBC). Click on System DSN tab and then click Add. You should see a SQL Server Native Client 10.0 driver there. Do not use SQL Server driver. It won’t work.

2014-01-10-21-51-33_05

Enter the name for the ODBC connection, a description and type the hostname for the SQL server. In my case, I’ll use vCenter, vCenter Database and sql.

2014-01-10-21-51-38_06

Next, choose SQL authentication and type the SQL user that we just created with the script (vpxuser and its password).

2014-01-10-21-51-43_07

Click the first check mark and select the VCDB database.

2014-01-10-21-51-47_08

Leave the defaults and click Finish.

2014-01-10-21-51-51_09

Click the Test Data Source button and make sure that it says that the connection completed successfully.

2014-01-10-21-51-55_10

Now, it’s time to install vCenter. Insert the DVD or mount the ISO image and the installer will start.

2014-01-10-21-51-59_11

Click the first option vCenter server and go thru the Next, Accept cycle. Once you reach the Database Options, select the second radio button and choose the ODBC connection that we just created.

2014-01-10-21-52-04_12

If you get this error, make sure you start the SQL Server Agent on the SQL server. By default this service is disabled. You can stop this service once the installation completes.

2014-01-10-21-52-08_13

Enter the SQL username and password that we just created.

2014-01-10-21-52-11_14

If you receive the following error, it means that you are not a db_owner on the VCDB database.

2014-01-10-21-52-15_15

You won’t be able to continue until you fix this. When you reach this screen vCenter Server Service, stop. You have an option to run the vCenter Server service as a local server account or you can choose a domain account. If you use a domain account, it should be a local admin on the server.

2014-01-10-21-52-20_16

Change or accept the defaults for the vCenter program.

2014-01-10-21-52-25_17

Select the first option.

2014-01-10-21-52-30_18

Change or accept the default ports. If you install vCenter on a shared server with IIS installed, you’ll have port conflicts here.

2014-01-10-21-52-35_19

Change or accept the default ports for the Inventory Service.

2014-01-10-21-52-38_20

Estimate how many VMs you’ll have.

2014-01-10-21-52-42_21

Click Install.

2014-01-10-21-52-45_22

After couple of minutes, click Finish to complete the install. Your vCenter Server should be up and running, but we are not over yet.

2014-01-10-21-52-49_23

We will install the Update Manager now. This part of vCenter is used to patch the vCenter and ESXi hosts. Log back to the SQL server and in SQL Server Management Studio, execute this script that will create a new database for the Update Manager. Make sure you change the file path for the database. In my case is C:\DATA. We’ll use the same vpxuser user for the Update Manager database.

CREATE DATABASE [VCUM] ON PRIMARY
(NAME = N'vcum', FILENAME = N'C:\DATA\VCUM.mdf', SIZE = 2000KB, FILEGROWTH = 10% )
LOG ON
(NAME = N'vcum_log', FILENAME = N'C:\DATA\VCUM.ldf', SIZE = 1000KB, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
go
use VCUM
go

On vCenter server, go to C:\Windows\SysWOW64 folder and run odbcacd32.exe. The Update Manager is using a 32-bit ODBC and by default, if you go to Administrative Tools and start the ODBC manager, you’ll execute the 64-bit version.

2014-01-10-21-52-54_24

Pick a name and description for this ODBC connection and specify your SQL server hostname.

2014-01-10-21-52-58_25

Select the VCUM database that we just created and similarly to the previous ODBC creation, finish the rest of the steps.

2014-01-10-21-53-03_26

Start the Update Manager install.

2014-01-10-21-53-07_27

Accept the defaults.

2014-01-10-21-53-11_28

Create a domain user that will run the Update Manager service. In my case I use svc_vcenter.

2014-01-10-21-53-15_29

Specify the 32-bit ODBC connection that we just created.

2014-01-10-21-53-19_30

Enter the same vpxuser and password.

2014-01-10-21-53-23_31

Specify if any proxy servers need to be specified. Update Manager requires Internet connection.

2014-01-10-21-53-27_32

Change or accept the defaults.

2014-01-10-21-53-31_33

The rest of the steps a re just plain Next, Next, Finish.

Once installed, go back and install the vCenter client. I won’t explain how to do this. It’s trivial. Log to the vCenter with a local admin password or with a domain account (if you run vCenter service under a domain account).

2014-01-10-21-53-35_34

Select the top left vCenter server name and then click on Permissions.

2014-01-10-21-53-39_35

Click Add.

2014-01-10-21-53-42_36

Type your domain, enter a user that you want to grant full admin rights and click Check Names. If everything is OK, the dialog box will just blink.

2014-01-10-21-53-46_37

Back in the previous dialog, select Administrator and click OK. We made svc_vcenter an admin vCenter user.

2014-01-10-21-53-51_38

From the vCenter client menu, select Plug-Ins and select the Update Manager plug-in.

2014-01-10-21-53-55_39

Click Run.

2014-01-10-21-53-59_40

Create a new datacenter, add the ESXi hosts and you are all set.

2014-01-10-21-54-02_41

Related Articles

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More