vSphere + SQL 2012 + AlwaysON

Over the weekend, one of my ex-colleagues reached out to me for my input on running SQL in a 2 node Microsoft Cluster. Of course, these servers were supposed to be VMs and all that. Now my initial reaction was, yeah sure you can do all this but there are restrictions that are placed on VMs that are part of MSCS. This included, affinity rules, exceptions in DRS, limited to two nodes only and all the other stuff that goes along with it.

Below are some of the limitations or stuff that you CANNOT do on VMs that are part of the MSCS. This is straight from the install guide:

  • Mixed environments, such as configurations where one cluster node is running a different version of ESXi than another cluster node.
  • Use of MSCS in conjunction with vSphere Fault Tolerance (FT).
  • Migration with vSphere vMotion of clustered virtual machines.
  • N-Port ID Virtualization (NPIV)

As I was going over the caveats, I was reminded that this will be running SQL 2012 using AlwaysON Availability Groups, and the VMs need to be in a cluster however there will bo no need for shared storage, even the quorum can be windows share somewhere on a fileserver etc. When I heard that, I was confused and asked for some time to do research. I read a few articles online, talked to folks on twitter, posted input on the secret vExpert community (which btw was very helpful and prompt) and came back with a totally different mindset to approach this.

Based on the feedback I got from everyone, from the articles I read and of course the AlwaysON intro my ex-colleague gave me I came to the following conclusion. VMs running SQL 2012 AAG in a Microsoft Cluster with no shared disk should be treated like any other VM. Which means, you can have more than 2 nodes and the limitations of  a typical MSCS VM does not apply. Why so?

To start off, what in the world is AAG? You can get some good detailed info on that here. But to put it simply, AAG is the new and improved HA and DR solution for SQL, kinda like database mirroring (the orignal database mirroring still exists but its probably on it’s way out).

It’s like mirroring, but we get multiple mirrors for many more databases that we can fail over in groups, and we can shed load by querying the mirrors.

It relies on Windows Failover Clustering and the file synchronization happens at the application layer. This means that all those contraints that are usually placed on MSCS VMs due to RDMs, dont exist here. This also means, you can vMotion the box and do everything that you would to most other VMs. To put it simply, it’s not a special VM anymore.

How is AAG better than database mirroring? Below is a list of some of the improvements extracted from this article:

  • Supports one primary database replica and allows up to 4 secondary database replicas targets.
  • Asynchronous-commit mode. This availability mode is a DR solution that works great when the availability replica copies are distributed with not so stable connection.
  • Synchronous-commit mode. This availability mode put emphasis on high availability and allows data protection over performance, con is transaction latency.
  • Allows automatic page restoration against page corruption.
  • Backupable and Read-only access to the secondary databases
  • Fast application failover is provided by availability group listeners.
  • The greater failover control is achieved by Flexible failover policy.

Of course there are a few things to consider when you run this all virtually (thanks to the VMTN feedback I received), even though you may be able to vMotion these boxes, keep in mind the Windows Failover Cluster (WFC) heartbeat is very sensitive and and the small stun time maybe enough for your cluster to assume a node has failed. So adjusting your heartbeat timeout maybe something to consider. Matt shows here how to do that here, though he is doing that on a Database Availability Group (DAG), it still relies on WFC like AAG.

Now how do you set this up? I was thinking about doing a step by step but I found someone else who already beat me to that. So here are the steps that cover setting up WFC to enabling AAG on SQL. Denny Cherry also plans to have a session around this topic at VMworld.

In the end, I think SQL 2012 with AAG will certainly help to better the relationship of SQL and virtualization. With the restrictions relaxed on this type of a setup, you can now have bigger WFC clusters within a HA/DRS cluster. With HA/DRS you get the protection from hardware related incidents and with AAG,  your application becomes intelligent. In the end you look good and find more time to do more important things in life. 🙂

PS : Lastly, we will still be doing a proof of concept to see how well this all holds up. I will encourage you to do your independent testing before introducing this in production. In paper this sounds perfect. I plan to keep this post updated with what we find / learn or at least a link to the updated post depending on how this goes. Good luck!

vBaby Alert!! Finally :)

For those of you who dont know, my wife and I had our first child earlier this year who is exactly 3 months old today. Aleena Marie Hashmi was born on Feb 10th 2012. So the one thing I wanted to get her was of course a VMware outfit, but considering how my luck has treated me over the years, Aleena was a very tiny baby who took 3 months to fit in the outfit her daddy got her.

It’s still a little big on her and her mommy kept saying she would look too fat bla bla bla you know how that goes. Anyways, I figured what better way to introduce a vBaby wearing a vShirt than posting it on a blog full of all kinds of vStuff!! Who says geeks don’t know how to have fun. We just do it a little differently.

[EasyGallery id=’aleena-vmware’]

 

SMTP and vCenter Ops Mgr

I have had a few people ask me how are SMTP alerts set in Ops Manager, so I figured I would do a little post on that in case there are more people confused on how to set this up.

First of all, this info is available in the install guide but I will try and clarify what I think may be confusing to some. If you click on “Notifications” from the Ops Manager portal you may be greeted by the message below if you have not set your SMTP settings yet.

Ok that is simple enough, go ahead and enter your settings. But soon you will realize that there is nohere to enter these settings. Right? Wrong!! You are looking in the wrong place. This is a excerpt from the install guide:

Prerequisites

  • Verify that the vCenter Operations Manager vApp is powered on.
  • Verify that you have administrator privileges to access the Administration portal and log in to the portal.

Notice it says “Administration Portal”. Your Ops Manager portal is usually https://UI VM IP however your “Administration Portal” is https://UI VM IP/admin. This is where you need to be. Once you log in there the instructions in the install guide listed below start making sense.

Again the following is an excerpt from the install guide, as you can also tell this is the place where you need to be in order to set up SNMP as well.

  1. On the SMTP tab, select the Enable report email service check box.
  2. Type the SMTP server address and port number.
  3. Type the name and email address to use when sending alerts or reports.
  4. If the SMTP server uses an encrypted connection, select the Server requires an encrypted connection check box and select the encryption protocol.
  5. If the email service needs to authenticate with the SMTP server when sending alerts, select the Outgoing SMTP server requires authentication check box and type the credentials.
  6. Select the Enable SNMP check box and type the destination host, port, and community information.
  7. Click Update to apply your settings.

vCenter Operations can send email notifications and scheduled reports.

Hope the above helps you in getting started with receiving those valuable notifications via email. One small suggestion, try not to go crazy with the email notifications because after sometime they may get treated like spam. You spent tons of money for Ops Mgr, make sure when it sends out a notification, its important.

vSphere 5 Lab Automation

I must admit the last few weeks have been super crazy which is why I havent been able to post as often as I would like. The other day, Alastair Cooke and company posted a nice automation tool that will enable you to build your lab in a snap.

I have personally not tried it out myself due to my crazy schedule but I know these guys are a group of very smart individuals. In a nut shell this tool lets you deploy your lab setup in a single laptop/dekstop with just 8GB of memory. Once deployed the tool will leave you with 2 ESXi hosts, 1 vCenter, 1 domian controler, 1 Freenas and 1 FreeSCO for you to test/learn etc. Keep in mind only free/open source software are distributed with the tool, you will need the installers and licenses for whats not considered free.

So, if you are new to vSphere and dont know were to begin, this will certainly help, you can also be a veteran and simply use this for testing purposes. The rest of the details are here.