Learning vSphere 6.5-Part-5-Installing vCenter Server on Windows

Till now in this series we have discussed a lot of theory about vCenter Server/VCSA, deployment type etc and also we looked into system requirements for vCenter Server and PSC installation. Now its lab time where we will see the installation/configuration of the components.

If you have missed earlier post of this series, you can read them from below links:

1: Installing and Configuring Esxi

2: VCSA Overview

3: vCenter Server and PSC Deployment Types

4: System Requirements for Installing vCenter Server

In my lab I am going to use an external SQL server database. My database version is SQL 2014.

1: Preparing vCenter Server Databases for Install

You can use following script to install the database and configure login,permission etc. This script will also configure the database schema for you

 

[code]
/ *** Create a SQL Server Database and User for vCenter Server *** /

use [master]
go
CREATE DATABASE [VCDB] ON PRIMARY
(NAME = ‘vcenter65’,
FILENAME = ‘C:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLDATAvcenter65.mdf’,
SIZE = 10MB,
FILEGROWTH = 10% )
LOG ON
(NAME = ‘vcdb_log’,
FILENAME = ‘C:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLLogvcenter65.ldf’,
SIZE = 1000KB,
FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
go
use VCDB
go
CREATE LOGIN [vpxuser] WITH PASSWORD=N’Telstra@123′, DEFAULT_DATABASE=VCDB, DEFAULT_LANGUAGE=us_english, CHECK_POLICY=OFF
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
use MSDB
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go

/ *** Create Database Roles and the VMW Schema and set Database Permissions ***/

CREATE SCHEMA [VMW]
go
ALTER USER [vpxuser] WITH DEFAULT_SCHEMA =[VMW]

if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = ‘VC_ADMIN_ROLE’)
CREATE ROLE VC_ADMIN_ROLE;
GRANT ALTER ON SCHEMA :: [VMW] to VC_ADMIN_ROLE;
GRANT REFERENCES ON SCHEMA :: [VMW] to VC_ADMIN_ROLE;
GRANT INSERT ON SCHEMA :: [VMW] to VC_ADMIN_ROLE;

GRANT CREATE TABLE to VC_ADMIN_ROLE;
GRANT CREATE VIEW to VC_ADMIN_ROLE;
GRANT CREATE Procedure to VC_ADMIN_ROLE;

if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = ‘VC_USER_ROLE’)
CREATE ROLE VC_USER_ROLE
go
GRANT SELECT ON SCHEMA :: [VMW] to VC_USER_ROLE
go
GRANT INSERT ON SCHEMA :: [VMW] to VC_USER_ROLE
go
GRANT DELETE ON SCHEMA :: [VMW] to VC_USER_ROLE
go
GRANT UPDATE ON SCHEMA :: [VMW] to VC_USER_ROLE
go
GRANT EXECUTE ON SCHEMA :: [VMW] to VC_USER_ROLE
go
sp_addrolemember VC_USER_ROLE , [vpxuser]
go
sp_addrolemember VC_ADMIN_ROLE , [vpxuser]
go
use MSDB
go
if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = ‘VC_ADMIN_ROLE’)
CREATE ROLE VC_ADMIN_ROLE;
go
GRANT SELECT on msdb.dbo.syscategories to VC_ADMIN_ROLE
go
GRANT SELECT on msdb.dbo.sysjobsteps to VC_ADMIN_ROLE
go
GRANT SELECT ON msdb.dbo.sysjobs to VC_ADMIN_ROLE
go
GRANT SELECT ON msdb.dbo.sysjobs_view to VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_job TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_delete_job TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_update_job TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_category TO VC_ADMIN_ROLE
go
sp_addrolemember VC_ADMIN_ROLE , [vpxuser]
go
use master
go
grant VIEW SERVER STATE to [vpxuser]
go
GRANT VIEW ANY DEFINITION TO [vpxuser]
go

/ *** Create a vCenter Server User by Using the dbo Schema and db_owner Database Role *** /

use VCDB
go
sp_addrolemember @rolename = ‘db_owner’, @membername = ‘vpxuser’
go
use MSDB
go
sp_addrolemember @rolename = ‘db_owner’, @membername = ‘vpxuser’
go
[code]

2: Create 64 bit DSN for ODBC Connection

Instructions for doing so can be read from here

Install vCenter Server

1) Mount the vSphere 6.0  installation media. Execute the “autorun.exe

The installation wizard appears. In the left pane select “vCenter Server for Windows”  and click on Install.

vc-1

2: Press Next to continue

vc-2

3: Accept the licence agreement and hit“Next”

vc-3

4) Under Select Deployment type choose “Embedded Platform Services Controller” and press “Next”

vc-4

5) Verify the “System Name” is a valid FQDN and press “Next”.

Note that system name can’t be changed post installation.

vc-5

6) On “vCenter Single Sign-ON Configuration” page enter vCenter Single Sign-On domain (default is vsphere.local), “Password” for administrator user  and “Site Name”and press next.

vc-6

7) In the “vCenter Service Account” window, select “specify a user service account” and supply the username in format Domainusername and the password for service account and press “Next”.

vc-7

Note: If you are planning to run your vCenter Server using a dedicated service account then make sure it has been granted “Log on as a service” rights and added to local Administrator group of same machine where you are installing vcenter Server.

8) On “Database Settings” page , select “Use an external database” and enter the DSN name, DB username and password and hit Next to continue.

vc-9

9) On  “Configure Ports” page, verify the default ports and press “Next”.

vc-10

10) In the “Destination Folder” window, change the destination folder if necessary and select “Next”.

vc-11

11) On ready to Install page review your settings and if everything is OK hit Install button.

vc-13

12) Let the installer run and install the components

vc-14

vc-15

13) Once the installer has finished installation, Click on Launch vSphere Web-Client and then click on Finish button to complete installation.

vc-16

14: Clicking on launch vSphere Web Client will bring the login page of vCenter Web-Client. Login with administrator@vsphere.local user

vc-17

Verify that login to Web-Client is successful.

vc-18

In next post of this series we will look into basic configuration of vcenter server.

I hope this post is informational to you. Feel free to share this on social media if it is worth sharing. Be sociable 🙂