Monday, June 10, 2013

Cannot create or update a non highly available VM -Error (23001)

This is the first time when I have created virtual machine using SCVMM. While creating VM it throws errorimage

This seems like you can not use cluster resource till you define the resource as highly available. After checking  option "Make this virtual machine highly available" VM creation went through.

image

Learning Hyper-V Lesson 10

Learning Hyper-V Lesson 9

I have discussed here how VLAN is created on HP virtual connect and then mapped to Hyper-V host. Once VLAN is created on virtual connect we need to use HP Network Configuration Utility to map this VLAN

image

Every VLAN which is created also create physical interface . Make sure you name it for better identification

image

Post this now we have to create logical interface on Microsoft VMM machine.  Select Fabric and then create a network site.

image

Now select each host and then choose virtual networks. Click on Add then choose network binding as "External" . Point this to the interface created on Hyper-V host

image

Now under hardware choose the interface and map it to logical interface

image

Saturday, June 8, 2013

Learning Hyper-V Lesson 8

Previous lesson 7 we discussed about setting SQL mirroring but then I was not aware what I need to do to start with SQL mirroring.  I decided to blog SQL 2008R2 install steps. Remember I am doing this production for the first time in life :) So pop-in SQL 2008R2 CD/ISO and run the installer.

This will check all the prerequisite 

image

Next it will ask what feature we are trying to install. We are installing just SQL server .

image

We need to insure that we have choose "Integration Service" here

image  

This will check for all the dependencies for feature selected.

image

Go with default instance.

image

Now disk space will be calculated for above feature installation.

image

Configure all the service to run with service account.

image

Choose the correct authentication method which you want. Recommended is to use mixed mode.

image

If you wana to place data and log files on separate drives. Everytime when you create new database this will place MDF file and LDF file on respective drive.

image

One more check before installation begun.

image

Finally nice summary for what install is going to be done.

image

If install is successful it will present message with green.

image

Learning Hyper-V Lesson 7

I am continuing this post from from Lesson 6.  Here we will discuss of setting up DB mirroring. So as per my understanding there are two way HA can be provided to DB 1) Clustering 2)Mirroring. In some situation both can be used as explained here and here .  Discussing SQL server HA is out of scope of this post.

Here we are using three server for mirroring 1) Principal running SQL enterprise edition 2) Mirror server running SQL 2008R2 enterprise edition and 3) Witness server running SQL 2008R2 standard edition. Witness can be any edition of server but Principal/Mirror need to be same edition. It is also recommended to use three different server for this purpose. Installation of SQL will be discussed in some other lesson. 

From Lesson 6 we have allowed SCVMM to create DB. Now we start with mirroring we need to backup the database. Before we backup the database make sure DB is in "Full Recovery " mode. By default SCVMM do not create DB in full recovery mode.

image

Now start the backup of SQL server database

image

And then perform choose backup type as full. Make sure you note down where the .BAK file is going to be placed. Because this need to copied to mirror server

image

Once the database backup is done , copy .bak file to the mirror server and then on Mirror server choose restore.

image 

Choose from device and provide the path to the copied .bak file. Make sure under "To Database" you should type exact name as that on "Principal"

image

Now very important select option and choose "Leave the database non-operational" . This will insure that DB does auto fail over. Also you can see it shows both the ldf and mdf file at respective location which is how we have setup SQL (Both Data and log on separate drive).

image

Once finish database status will appear with same name but status will be as "Restoring" . And FYKI this will not change because this is mirroring database is supposed to be setup (Sorry about my limited SQL knowledge).

image 

Now we have to start with mirroring on "Principal database"

image

And then choose configure security

image

This will run through Mirroring wizard

image

Here make sure witness server is selected to include this

image

By default Principal and Mirror will be selected.

image

Now Principal server will be selected and port by default will be 5022. IF all the three instance (Mirror/Principal/Witness) are on same server then we need to choose different port. End point name should not be changed because mirroring works using this endpoint.

image

Here it will ask for Mirror instance. Type the mirror SQL server name and then connect. Type port number and endpoint name should be same as principal.

image

Next screen will ask for Witness server type SQL server name connect it via SQL authentication. Maintain same port number and endpoint name

image

Type service account for all the 3 SQL instances

image

This provide nice summary

image

Here it will configure the end points

image

And then it will ask to start mirroring

image

If everything is OK then mirroring will be established for High Safety with Automatic Failover. Status on principal will show as "Principal,Synchronized" where as on Mirror it will show as "Mirror,Synchronized/Restoring"

 image      image

Next Blog I will discuss about SQL installation