vCenter Server Database thinking
I am often asked about some strategies for the vCenter Server database. What to use and where to put it. Here are some of the things I discuss.
The database needs to be sized. You can use the Excel spreadsheet at http://www.vmware.com/support/vi3/doc/vc_db_calculator.xls or if you already have VC running and are changing the statistics settings the dialog will estimate the new size for you.
The next question is where to run the database? You choices are locally on the same machine as vCenter Server or on a separate machine. Your choice is going to depend on scale and licenses. Typically most implementations I see run the database on the same server as vCenter Server (and the license server) as for most implementations the load can easily be handled by a single physical or virtual machine. At some point a separate server may be required, but this is going to only be on the larger implementations. Sometimes a customer will have a main database server which they want to run the vCenter Server database off, which is fine, usually these are a cluster and built for performance, scale and uptime.
The only one thing you DO NOT want to do is run your vCenter Server database from a separate virtual machine (whether the vCenter Server is physical or virtual). Yes one CAN make it work but I have yet to see an example of where the benefits outweigh the startup difficulties this creates. Maybe you can convince me. Doing this just sets you up for a world of pain. If your environment is small you can use Express, if its not that small you can affort to do it right.
The database needs to be up and running before the vCenter Services start. If they are on the same machine you want to set the service dependencies just in case, see http://kb.vmware.com/kb/1007669 for details on how to do this.
Remember this database is going to need some maintenance, many people forget this. As a minimum its going to have to be backed up so include a backup agent or configure a script to dump a database backup to some other location that is being backed up.
A great reference on the vCenter Server database maintenance is http://www.vmware.com/files/pdf/vc_microsoft_sql_server.pdf which covers the following handy topics.
- Backup and Recovery
- Reducing Database Privileges after Installation for Higher Security
- Purging Old Data
- Enabling Automatic Statistics
- Upgrading to a New Version of SQL Server
- Appendix A: Purging Old Database Records
- Appendix B: Automating Connections to ESX Server Hosts
Here is a reading list that VMware Architects should have at least scanned.