my personal blog about systemcenter

Archive for July, 2012

My normal weekend procedure these days goes with baby sitting Virtual to Virtual converting from VMware to Hyper-V using Virtual Machine Manager 2012

I had a few servers that failed and for instead of trouble shooting I did a retry as the source servers was in dire need of being put down so I thought the error was due to that , but again after x hours the covert job through VMM failed again.

 

image

The Convert job starts without issues

image

But fails on disk 2

image 

Error 2909 , from the Virtual to Virtual Conversion , claiming that the file already exists , looking the target before job start shows no vhd files in the directory.

 

image

Looking at the source side I can see that there is a vmdk for the system drive that completes without error

image

And the data drive that fails.

The Error 2909 was due to the drives both being called test.vmdk as vmware don’t enforces different vmdk names if the files are located on different data stores.

So after changing the vmdk file name on the source I can convert the virtual machine from VMWARE to Hyper-V

Microsoft been so kind of creating AddNewClusteredVM.ps1 script for Hyper-V and Data Protection Manager , this script will enumerate all virtual machines in a cluster and add them to a protection group, as there is no “auto” protect options in Hyper-V clustering as there is on SQL protection this should save some time and errors.

 

For the script to work there needs to be a protection group ready for this

 

image

image

So we create a protection group in Data Protection Manager console

running the AddNewClusteredVM.ps1 with cluster fqdn and protection group

Enter the cluster FQDN : hvc01.internal.systemcenterdemo.dk
Enter the name of your existing Hyper-V protection group : Hyper-V

dpm10.internal.systemcenterdemo.dk                                                              
Running Inquiry on HVC01.internal.systemcenterdemo.dk
Running Inquiry on Available Storage
Running Inquiry on Cluster Group
Running Inquiry on SCVMM DHCP01 Resources
Running Inquiry on SCVMM IPAM01 Resources
Running Inquiry on VMM01
Running Inquiry on VMMDB01
Waiting for inquiry to complete 0 item(s) obtained.


Inquiry listed 6 item(s)…
Adding data source Backup Using Child Partition Snapshot\DHCP01 to Hyper-V
Adding data source Backup Using Child Partition Snapshot\IPAM01 to Hyper-V
Adding data source Backup Using Child Partition Snapshot\VMMDB01 to Hyper-V
Adding new Hyper-V data sources to Hyper-V

 

image

The powershell script adds the unprotected servers to the dpm server’s protection group

I got a surprise email last Sunday from Microsoft where I was presented with a MVP Award in System Center Cloud and Datacenter Management , I am still a little shocked and very proud to be in the company of the greatness that fills up the MVP’s in the System Center Cloud and Datacenter Management area , I hope I can keep up to their level I will do what I can that’s for sure.

Thank you to everyone involved in making this true Smile

Snippet from mail.


Dear Flemming Riis,
Congratulations! We are pleased to present you with the 2012 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in System Center Cloud and Datacenter Management technical communities during the past year.

One of the new features in Virtual Machine Manager 2012 SP1 CTP2 is the support of SQL Server 2012.

 

This post will try to cover the setup of Virtual Machine Manager in setup with no single point of failure , using Virtual Machine Manager HA and SQL Server 2012 Always On Availability Groups

This post is spawned from a idea and is far from a validated setup , there is from what I can find no official word on SQL Server 2012 Always On Support in Virtual Machine Manager , this setup will also require SQL Enterprise Edition so skipping from the free SQL Standard Edition that “follows” the new system center licensing.

The purpose of this test is to enable Virtual Machine Manager to run on SQL 2012 Always On databases with no shared storage

This post is very long sorry but I voted against splitting it up so bear with me

I am not a SQL Expert so feel free to comment on any mistakes on the way , there is no heartbeat network or replication network everything is running off the same nic nothing that would be a option on real production

 

image

On the two nodes install failover clustering and create a new cluster

 

image

During this setup I used VMMDB I would use a different name as VMMDB is being used for database access , so I would use VMMDBCLU or something like that and then setup a dns entry for VMMDB to point to the cluster IP address

image

Again use VMMDBCLU and setup a dns entry with VMMDB to point to the IP Address

 

 

image

After the cluster install SQL 2012 Enterprise Edition , do NOT use the “SQL Failover Cluster” just use the standalone installer

image

For VMM select SQL Server Feature Installation

image

Database Engine and Management Tools

image

As this is for testing just throw the database at the default location

image

And enter a service account for SQL

image

And set Collation just to be sure

image

Add the VMM service Account and VMM Database Account

image

Again use VMMDBCLU for Windows Failover ClusterName

 

This is the first part of the SQL Installation

 

 

image

To prepare for VMM installation create a container for VMM Configuration data

 

image

 

image

Delegate Full Control to the VMM service account

 

As VMM is being installed on Windows Server 2012 we need to install Windows Assessment and Deployment kit instead of WAIK , this step needs to be completed on both servers needed for Virtual Machine Manager HA

http://www.microsoft.com/en-us/download/confirmation.aspx?id=29929

Windows Assessment and Deployment Kit (ADK) for Windows® 8 Release Preview

image

image

Select deployment tools and Windows PE

image

This takes a while Smile

 

 

(http://go.microsoft.com/fwlink/?LinkId=253555

Microsoft® SQL Server® 2012 Native Client

Microsoft® SQL Server® 2012 Command Line Utilities

Install SQL Server 2012 Native and Command Line Utilities  , this step needs to be completed on both servers needed for Virtual Machine Manager HA

 

 

 

image

After completing the prereqs start the installer on the first VMM server

 

image

Select Management Server and Console

 

image

Select VMMDB as SQL Server (through our dns entry) and create a new database

 

image

Add the service account , this must be local administrator on both VMM servers , and Store my keys in active directory

image

Add Library Path

 

Repeat on 2nd VMM Server

image

Select VMMDB and existing database

image

Enter Service Account

 

 

image

In order to prepare for the SQL Availability Group we need to create a fileshare where the SQL Service account can access the database backup needed to setup initial replication

 

 

image

Virtual Machine Manager database is pr default in simple mode , for SQL Replication to work we need to change it to FulL Logging , after changing the database we need to create a full backup of the database

 

 

image

Start the New Availability Group Wizard

 

image

Set a name for the  Availability Group

image

Select the VirtualManagerDB that Virtual Machine Manager uses

image

Select Automatic Failover and Synchronous , this will commit on both servers so there is no data loss if one servers hardware fails , and Automatic Failover will ensure that the systems are unaffected

 

 

image

and the VMMDB02 server

image

Set FULL option for initial data sync and enter the file share created before as target for the backups

image

Success exept for listener (that we will correct)

 

image

As I used the VMMDB name for the cluster I need to rename it now to VMMDBCLU , this is a mess so use a dns record instead when testing

 

 

 

image

Delete the static dns entry for VMMDB and create a listener

image

Use VMMDB the default SQL port we specified in the Virtual Machine Manager Install

 

 

image

To simulate a failover either stop the server or the server

 

image

And we can see that VMMDB02 will take over

image

And our Virtual Machine Manager keeps rocking on without interruptions.

 

If you made it this far THANK you Smile