Hope you all are doing good, its been long time since i have written some thing so today i decided to start again and this time its going to be a series 🙂
Imagine you want to give a demo which requires SQL Server failover cluster but you do not have a environment to show that, but how good it be if we can achieve this with a single machine itself without buying expensive hardware or extra machines.. isn’t it cool??
Hyper-v is one great role/feature available which can help us in achieving this. You can read more about Hyper-V in this technet .
This is an effort to start series of blog on hyper-v, in this blog we will create our own lab with 1 domain controller and 2 nodes to work as failover cluster. If you want to create 1 single machine as VM you can follow this well documented blog as well.
We will divide this series in 3 parts as follows.
– What is hyper-v and benefits of hyper -v
– Requirement for hyper-v on Winodws 8/Windows Server 2008 to create SQL Server Failover cluster
– Prepare VM’s for SQL Server failover cluster
– Create 1 Virtual Machine which will act as domain controller
– Create 2nd Virtual Machine as Node 1
– Create 3rd Virtual Machine as Node 2
-Install Domain controller and create your domain
– Create your domain
– Add DHCP Server Role
– Join all 3 VM’s in this domain
-Create a hyper-V 2 Node SQL Server Failover Cluster Environment
– Enable Failover cluster
– Add nodes in Failover cluster
– Configure iSCSI targets, connect both the nodes with this target to create shared disk.
– Install SQL Server 2 node failover cluster
So lets start with the first segment
What is hyper-v and benefits of hyper -v?
Hyper-V is a role in Windows Server 2008 and Windows Server 2008 R2 that provides you with the tools and services that you can use to create a virtualized environment. One of the biggest advantage/benefit of Hyper-V is you can create an “high availability” scenario, you can create your own virtual lab and create a failover scenario.
Requirement for hyper-v on Winodws 8/Windows Server 2008 to create SQL Server Failover cluster
– Hardware Requirement
–Host OS:- Windows 8 Pro or Windows 8 Enterprise ( Must be using a 64-bit operating system)
–Memory:- Minimum of 8GB of RAM (Hyper-V can run minimum 4GB of RAM but in our case we would need minimum 8 GB of run to perform well)
–CPU:- Your CPU must support the following features
VM Monitor Mode Extensions
Second level Address Translation Extensions
Virtualization Enabled in Firmware
Data Execution protection
You can go to MSINFO32 and check status for all of the above, everything should show “YES”
Note: In MSINFO32 if you see “Virtualization Enabled in Firmware” as “No” you will have to enable it at BIOS level. you need to enable Hardware Assisted Virtualization (HAV) – at BIOS level.
– Software requirement
Microsoft iSCSI Target Installer
SQL Server 2008 (ISO)
Windows Server 2008 (ISO)
Once we have all the requirement ready, lets try to create our first machine which will act as Domain Controller.
Before start creating machine we need to enable hyper-V feature on the machine, to enable this feature go to control panel click on programs click on “Turn Windows features on or off” check the box Hyper -v please check the screen shot below.
Once this feature is enabled you should be able to see this in program, click on start menu and search for hyper and you should be able to see below 2 programs.
Before we proceed any thing lets create network, please follow the screen shot below to create external network, in Hypoer-V Manager right hand side go to Actions and select Virtual Switch Manager
Click on New Virtual Network switch
I have selected internal network as i did not want to bind it with physical network but if you want you can select external network as well.
once the network is created now its time to create our first VM which will act as domain controller, please follow below screen shoots to create a VM.
1) Go to Hyper-V manager and right click and select new Virtual Machine
2) Give the name to this VM machine
3) Select the amount of RAM you want I would suggest to have 1 GB of Ram, and yes don’t select “Use Dynamic Memory for this virtual machine”
4) Select the network name we created last time i named it “Mynetwork”
5) Specify the location of harddisk and the size of the disk
6) Select the location of Operating System ISO file.
7) Now click on Finish and you machine is ready 🙂
8) Lets start this VM so that we can install OS and make this VM usable 🙂 go to in the hyper-V manager you can see your VM listed in Virtual Machines section, right click on machine and click on start
9) This will start VM and since we had already selected the ISO location during setup it will automatically start installing OS as well.
10) Follow all the remaining steps the way we install new OS and you will see below screen during the OS installation
11 ) finally we have our machine ready to login 🙂
Now as per our discussion we need 2 more VM’s to achieve SQL Server failover cluster, you need to create 2 more VM machines which will act as NODE1 and NODE2. You can follow the above steps ( 1 -11) again to create 2 more machines and give them name as Node 1 and Node 2.
At this point you will have your 3 machines ready to ROCK!!
We have done lot of work isn’t it?? its time time to take some rest and wait for my next post.
the next blog will teach us how to create Domain Controller, create your own domain and add 2 machine (Node 1 and Node 2) s in the domain..
Till then have fun and stay tuned 🙂