In my vSphere lab environment I like to try and run things as closely as possible to how it would be run in the “real world”. Of course this isn’t always possible due to hardware and budget limitations although there are a few things I can do such as running a dedicated database (DB) server VM(s) from which to run the different vSphere related DB instances, such as vCenter, Update Manager, View, etc. This is as opposed to running a locally installed SQL Server Express instance for every database in the lab environment.
Admittedly this does involve some extra leg-work though there is definitely value in this approach as it does expose you to extra best practices and gotchas that you can then directly apply to that “real world” environment. Always better to cut your teeth, learn and make mistakes in a lab environment.
vCenter Server 4.1 & 5.0+ require a 64-bit ODBC DSN Connection
Anyway, when taking this approach and not installing Microsoft SQL Server locally on your physical or virtual vCenter Server machine then, unless its already been installed, you won’t have the necessary 64-bit SQL Server Native Client driver to establish the required 64-bit ODBC DSN connection between the vCenter Server and the MS SQL Server.
By default Windows Server 2008 R2 only installs a 32-bit version of the Microsoft SQL Server driver (ie: ‘SQL Server v6.0.1.xxxx.xxxxx) used to establish an ODBC connection to a Microsoft SQL Server. This may be ok for some applications though VMware vCenter Server from version 4.1 onwards requires that a 64-bit driver and ODBC DSN connection be used.
All this means is that on your Windows OS operating system (OS) based vCenter Server machine you will need to download and install something called the Microsoft SQL Server Native Client, which will provide the required 64-bit ODBC driver (ie: SQL Server Native Client 10.0). To ensure you are running one of the later versions of this Native Client I recommend you use the Microsoft SQL Server 2008 R2 Native Client version. There are details below on where to download this version of the Native Client.
Use the 64-bit Microsoft SQL Server 2008 R2 Native Client
Click here to visit the Microsoft SQL Server 2008 R2 Native Client download page and scroll halfway down the page to find the three different download links (ie: x86, x64 and IA64) – for vCenter Server 5 you will want to download the x64 package. Then run this downloaded executable from the machine which will be running your vCenter Server instance. Even if you’re running an earlier version of Microsoft SQL Server (eg: 2000, 2005 or 2008) this version of the SQL Server native client will still work.
For added convenience I have created an ISO file of the x64 Microsoft SQL Server 2008 R2 Native Client which you can download from here. Note: Always check however that there isn’t an updated version of the client available for download from Microsoft.
Before installing the x64 Microsoft SQL Server 2008 R2 Native Client you will only see this 32-bit version of the ODBC driver when creating a new ODBC DSN.
After installing the Microsoft SQL Server 2008 R2 Native Client you will see the inclusion of a new driver entitled”: “SQL Server Native Client 10.0”. This is the x64 driver you want to use to make the ODBC DSN connection between your vSphere vCenter Server server or VM to the MS SQL Server.
Then after creating the ODBC DSN (using the 64-bit driver) and getting to the stage in the vCenter Server installation process where you have to select an “existing supported database” you will see the name of the vCenter related database you created the 64-bit ODBC DSN for, as opposed to a blank white area with no SQL Servers specified. Hurray!
Is it working? Other gotchas …
As mentioned above, after configuring your ODBC DSN connection using this freshly installed x64 SQL Server Native Client driver you should now be able to successfully find the MS SQL server and pre-created vCenter DB instance from the drop-down list box during the vCenter installation process. If the vCenter Server is still unable to connect or find the MS SQL server then go through all of the ‘standard’ type trouble shooting steps, such as double-checking the networking configuration of both machines (ie: vCenter Server and MS SQL Server) and confirming that the relevant services are up and running.
But if all of that checks out ok you will likely find, especially if running Windows Server 2008 R2, that the relevant MS SQL Server ports are blocked at the operating system firewall level or on a firewall appliance between the vCenter and SQL Server. Ensure that port TCP 1433 is open on any firewall between the vCenter Server and the SQL Server machines.
VMware vCenter Server Database Options & Prerequisites
As you’ve probably gathered the database of choice in my vSphere lab environment is always Microsoft SQL Server, rather than Oracle or IBMs DB2 databases which can also be used for vCenter Server 5.0. The reason being is that I’m familiar with MS-SQL and have access to the software via the SQL Express edition or my MS TechNet subscription.
- The IBM DB2 database is only supported for vCenter Server. There is no support for Update Manager or any plug-in that requires a database.
- Update Manager still requires the use of a 32-bit DSN.
Just a quick reminder (though I’m sure you haven’t forgotten) – Microsoft SQL Server 2005 Express (vSphere 4) & SQL Server 2008 R2 Express (vSphere 5) should only be used for small deployments of up to 5 ESXi hosts and/or 50 VMs. In many situations this makes it ideal for smaller vSphere lab environments (if you don’t have a MS TechNet subscription), and although not the full-blown version of MS SQL, by installing it on a dedicated VM and have it servicing all of your lab’s vSphere related MS SQL DB requirements can make it an effective and low cost solution.
Before installing vCenter Server 5.0 there are a couple of pre-requisites for the server onto which you’re installing vCenter. These pre-requisites are Microsoft .NET 3.5 SP1 and if you intend to install the Microsoft SQL Server 2008 R2 Express database then the Windows Installer 4.5 is also required (if your OS doesn’t already have it installed). For added convenience the install files for both of these can be found in the VMware vCenter Installer window (see image below).
Here are a couple of links containing very useful information on vCenter Server 5.0 and vSphere 5.0 itself.
Check out the “Installing vCenter Server 5.0 best practices” guide here, which is full of useful of information, such as recommended hardware configurations for running your Center instance on and how to set up the associated database.
- VMware vSphere Documentation: http://www.vmware.com/support/pubs/vsphere-esxi-vcenter-server-pubs.html