Wednesday, February 27, 2013

VCenter 5.1 SQL Database install/setup

Per my previous post pertaining to losing my VCenter in our data center this week I had a crash course in SQL database setup for VCenter 5.1.  I come from working 10 years in the VAR business which was all SMB IT support so any VCenter setups I had done in the past I was able to get away with SQL Express databases for VCenter.  With VCenter 5.1 there are now two databases needed.  One for the SSO and obviously one for the VCenter.  My previous post outlines how to install the database for the SSO and this step is required before you can install VCenter 5.1 so if you have not done that yet you need to!

If you have or are planning to have more than 5 hosts and 50 VMs than you cannot use the SQL Express version for VCenter.  I will out line what I did to install a full SQL 2008 r2 database in preparation for your VCenter install.  Keep in mind that as of this writing VMware does not yet support SQL 2012 or Server 2012 for its SSO or VCenter products.

 - First: Create an individual role account called "SQL" or "SQLDB".  I am very anal and can't stand it when people tie all their services to the domain administrator account, or worse... the user account of the Network Admin.  (Its one of my huge pet peeves).

- Make sure you have .NET installed and updated.  On server 2008 this is installed by installing the Application server role in the server manager.  Make sure to run windows updates after that to patch it.

- Launch your SQL 2008 r2 install and click on "Installation" and "New installation" which is the first option.



There will be some checks that run.

- The next screen is your product key screen so what you need here and click next, accept the terms and click next.

- On the Setup Support Files screen you should keep the defaults and click next.

- If you run into any warnings on the next screen be sure to address them as neccesary.

- Next, leave the default selected: "SQL Server Feature Installation".

- Now we are going to check the following: Database Engine Services, Client Tools Connectivity, Integration Services, Management Tools - Basic, Management Tools - Complete.  Change your directory paths as you wish.  So it should look like this:



- Click next until you get to the instance configuration screen.  Here you can get fancy and change the default settings to what you want but I choose to keep it simple and not create headaches and leave it all default.


Click next until you get to the Server Configuration screen.

- Here select the "Use the same account for all SQ: Server services" and put in your SQL account you created in AD earlier.



Make sure to change the start-up type to "automatic" for the SQL Server Agent before clicking next.



On the "Account Provisioning" screen, select "Mixed Mode (SQL Server Authentication and Windows Authentication).  Set a password for the built in SQL Server system administrator account.  This is the "sa" or Super User account for the database.

- Under "Specify SQL Server Administrators" you can add any additional users or groups that will need to maintain the database.  I added a group that our SQL folks are a part of.

- That's it.  Keep moving through the rest of the screens and you are done!  Make sure to run windows updates again after words.

Database Configuration

OK... now you got SQL installed so we need a database for the Vcenter.

- Start the SQL Server Management Studio which is in the default area of the program files under the start menu.  Log in with the "sa" user account.

- Right click on the topmost SQL Server object which is usually name after the server you are on or "localhost" depending on how you logged in.


- Choose "properties", then the "Memory" page.  I configured mine like this for my environment to start.  You can always change it later and increase the memory.  For now I set the maximum server memory to 50% of the memory the server actually has on the host.


- Click OK and your back at the home screen.  Now right click the databases folder and select "new database".  


- Under "General" i set my database name to "VCDB", but this you can safely use what you want.  Under the "options" set the recovery mode to "simple".  Click OK and you now have a new database.

- Right click the "security" folder.  Pick "new", "Login".


- Under "general" enter the username "vpxuser", select "SQL Server Authentication"  and enter a password.  I uncheck the "enforce password policy", "enforce password expiration", and "user must change password at next login".  Set the default database to "VCDB" and language to English.

- Click the "user mappings" page on the right.  Check the "Map" box for VCDB. then choose db_owner from the role membership list below.  Then check the "map" box for msdb, and choose db_owner.  I also select the "..." area in the "Default Schema Column" for both msdb and VCDB and set the default schema to "dbo".  Click OK.

- Now we need to configure the TCP/IP options.  Vmware has good documentation on how to do this.  It cam be found here and I really recommend following this guideline.

- Next the "local launch" permissions needs to be set.  Go to Administrative tools and "Component Services".  Go to "Component Services", "Computers", "My Computer", "DCOM Config".  Right click "MsDtsServer100" and choose properties.  Under the Security tab and "Launch and Activation Permissions", select "Customize", then "Edit".  Add the "SQLDB" user account you created.  This will prevent some common errors that pop up in logs and ensures scheduled jobs run.




- Lastly we need to create an OSBC data source.  This is one where again, VMware's library notes are very good and easy to follow.  You can find them here.

That is it!  Your set to install VCenter now using your own SQL database!

Happy virtualizing!

No comments:

Post a Comment