SQL Server 2008 Live Migration with Hyper-V
Virtualization is hot, because we can consolidates disparate servers in one box. It’s easier to manage one rather than multiple physical machines. Many companies run under utilized hardware so It can be optimized with Hyper-V. However, consolidation brings another challenges: there is only one single point of failure. That’s why we need to plan a disaster recovery scenario.
Hyper-V in Windows Server 2008 R2 already supports Live Migration. It means all services and application are still accessible when the migration is happening. This is another bonus of using Hyper-V beside the consolidation and cost saving. Running SQL Server 2008 on top of live migration enabled Hyper-V gives many advantages. When the migration/failover happens, it’s still maintain user sessions and connection.
Another advantage of using Hyper-V instead of failover cluster is It can run on top of commodities hardware. I’m not saying we can use mediocre one, but a standard high performance machine should work. The most important component is storage. We need to have FAST storage. Another tips for performance is a fast network. A Gigabit switch is a must, with multiple NICs on every machine so we can isolate traffic between inter server and application.
In general, below are steps to configure SQL Server 2008 and live migration enable Hyper-V:
- Configure shared storage (SAN, iSCSI, etc)
- Connect both nodes to shared storage
- Install Hyper-V role and Failover Cluster in both nodes
- Validate cluster configuration
- Create a cluster
- Create a Virtual Machine and enable high availability for live migration
- Install OS and SQL Server 2008 R2 in VM
I did presentation and demos for Singapore CTU in this topic. It was a challenging task because I only had 2 machines, so I had to squeeze 4 VMs. I did not have privilege of multiple NICs so my storage server was up and down. It was a lucky timing that everything run well when I did live migration scenario. The PPT can be downloaded here:
Many thanks to Andrew who helped in Hyper-V cluster setting. He also created step by step storage and cluster configuration. It was presented for Singapore Windows UG: