Monday, September 30, 2013

Virtual Machine Manager 2012 vs SQL Server 2012 Always On

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
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


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

SCOM – Check Size of Databases (SQL Standard Reports)

If you want to know how much space your OperationsManger database is using you could run a SQL Report. Because it is a feature from SQL Server 2008 R2 it’s easily overseen I just want to show an example.
Open SQL Server Management Studio navigate to Operations Manager database and make a right mouse click. Click “Reports/Standard Reports/Disk Usage”…
image
After a few seconds a pie chart will be shown. On top you see the total size of the database including log file and also each file size of the data and log file. Usually a database should have “Unallocated” (green) space available.
My left pie just shows that “Data”, “Unused” and “Index” uses the entire space. This means my database is full. Since OperationsManager database does not autogrow it just stays this way.
image
The side effects are several critical alerts and the eventlog will show e.g. errors like event id 10801…
image
To resolve this, just resize your database. First calculate how much space for your OperationsManager database you need by using the Sizing Helper Tool . Then go into the database properties and set the appropriate settings. SCOM 2012 configures by default the transaction log half the size of the database log, keep this in mind.  Click o.k. and SQL Server will resize the database. You don’t need to reboot your servers nor anything else.
image
Next run the SQL Server Report again and finally you get “Unallocated” space…
image

Tuesday, September 17, 2013

Windows Azure Online Backup

It’s sometimes easier to think about cloud computing in all or nothing terms – move everything into the cloud or leave everything as-is, on-premises.  But, as most know, the emerging reality is more of a hybrid approach, combining both cloud and on-premises resources.  Windows Server 2012 and System Center 2012 SP1 are embracing the hybrid model with services including Windows Azure Online Backup.  It’s a great example of how Windows Server, System Center and Windows Azure work together in what we call the “Cloud OS”.

Currently in preview, Windows Azure Online Backup is a cloud-based backup solution enabling server data to be backed up and recovered from the cloud in order to help protect against loss and corruption.

The service provides IT administrators with a physically remote backup and recovery option for their server data with limited additional investment when compared with on-premises backup solutions.

In addition to cloud-based backup for Windows Server 2012, we are pleased to announce that Windows Azure Online Backup now also supports cloud-based backup from on-premises System Center 2012 SP1 via the Data Protection Manager component.

Windows Server 2012
Cloud-based backup from Windows Server 2012 is enabled by a downloadable agent that installs right alongside the familiar Windows Server backup interface. From this interface backup and recovery of files and folders is managed as usual but instead of utilizing local disk storage, the agent communicates with a Windows Azure service which creates the backups in Windows Azure storage.

System Center 2012 SP1
With the System Center 2012 SP1 release, the Data Protection Manager (DPM) component enables cloud-based backup of datacenter server data to Windows Azure storage.  System Center 2012 SP1 administrators use the downloadable Windows Azure Online Backup agent to leverage their existing protection, recovery and monitoring workflows to seamlessly integrate cloud-based backups alongside their disk/tape based backups. DPM’s short term, local backup continues to offer quicker disk–based point recoveries when business demands it, while the Windows Azure backup provides the peace of mind & reduction in TCO that comes with offsite backups. In addition to files and folders, DPM also enables Virtual Machine backups to be stored in the cloud.
Windows Server 2012 Essentials
Small businesses using Windows Server 2012 Essentials can also access cloud-based backup capabilities by downloading the Windows Azure Online Backup integration module, an extension for the Windows Server 2012 Essentials dashboard. The agent extends the server folder page in the dashboard with online backup information, provides common backup and recovery functions, and simplifies the setup and configuration steps.

Key features
Below are some of the key features we’re delivering in Windows Azure Online Backup:
  • Simple configuration and management.
    • Simple, familiar user interface to configure and monitor backups from Windows Server and System Center SP1.
    • Integrated recovery experience to transparently recover files, folders and VMs from the cloud.
    • Windows PowerShell command-line interface scripting capability.
  • Block level incremental backups.
    • Automatic incremental backups track file and block level changes, only transferring the changed blocks, hence reducing the storage and bandwidth utilization.
    • Different point-in-time versions of the backups use storage efficiently by only storing the changed blocks between these versions.
  • Data compression, encryption and throttling.
    • Data is compressed and encrypted on the server before being sent to Windows Azure over the network. As a result, Windows Azure Online Backup only places encrypted data in the cloud storage.
    • The encryption passphrase is not available in Windows Azure, and as a result data is never decrypted in the service.
    • Users can setup throttling and configure how Windows Azure Online Backup utilizes the network bandwidth when backing up or restoring information.
  • Data integrity verified in the cloud.
    • Backed up data is also automatically checked for integrity once the backup is complete. As a result, any corruptions due to data transfer are automatically identified and repair is attempted in the next backup.
  • Configurable retention policies.
    • Retention policies Configure and implement retention policies to help meet business policies and manage backup costs.
Getting started
Getting started with Windows Azure Online Backup is a simple two-step process:
  1. Get a free preview Windows Azure Online Backup account (with 300 GB of cloud storage) here.
  2. Login to the Windows Azure Online Backup portal and download and install the Windows Azure Online Backup agent for Windows Server 2012 or System Center 2012 SP1 Data Protection Manager. For Windows Server 2012 Essentials, download and install the Windows Azure Online Backup integration module.
Once you have installed the agent or integration module you can use the existing user interfaces for registering the server to the service and setting up online backup.
Windows Azure Active Directory Management Portal
With today’s release of the Windows Azure Online Backup preview we are also releasing a supporting preview of the Windows Azure Active Directory Management Portal.  Customers can use the Windows Azure Active Directory Management Portal to sign up for Windows Azure Online Backup and manage users’ access to the service.  Administrators can now use the preview portal at https://activedirectory.windowsazure.com.

We’ll have more details on how the new Windows Azure Active Directory Management Portal can be used to manage your organization’s identity information in a separate blog post soon.
Thanks for reading!

Friday, September 6, 2013

Building a private cloud with System Center 2012: Part 1


Microsoft's much-changed System Center 2012 includes a refresh of all the components, led by Virtual Machine Manager — which, among other new features, can now be used to manage platforms besides Microsoft's own Hyper-V. System Center Orchestrator, the workflow automation tool, also comes in for a revamp, and there's a totally new application —App Controller — for template-controlled self-service access to private and public cloud resources.
The 'cloud' word appears a lot in relation to the new suite, as System Center 2012 is positioned as a platform for deploying and managing private cloud infrastructures. More specifically, it's seen as an enabler for companies seeking to build their own private Infrastructure as a Service (IaaS) solutions.
To support this, Microsoft has released what it calls the Private Cloud Evaluation Software bundle, containing all the bits of System Center 2012 needed to create and evaluate a private cloud infrastructure of your own. Which is exactly what we opted to do, with the following results.
Committed testers only
The first thing to note is that setting up a Microsoft private cloud is a far from trivial exercise and definitely not something for the faint hearted. As we quickly discovered, not only do you need decent server hardware and a reasonable degree of technical ability, you also need lots of time. What's more, it helps if you can think on your feet and solve problems yourself rather than expect to be spoon-fed a quick and easy solution, as that's definitely not what you get.
Going prepared
Assuming you have the tenacity to see the project through, getting hold of the necessary software is one of the easiest of the tasks involved. However, even that wasn't entirely straightforward.
Available to download from the Microsoft TechNet Evaluation Center, the Private Cloud Evaluation Software bundle comprises most of the components that make up System Center 2012 — but not all, and certainly not in a final polished format. This gives rise to a number of difficulties when it comes to deployment, which we'll cover shortly.
Our download included the following System Center 2012 components:
·         Orchestrator
·         Virtual Machine Manager
·         App Controller
·         Operations Manager
·         Configuration Manager (not required for the private cloud evaluation)
·         Service Manager
·         Data Protection Manager
Endpoint protection isn't needed but an (incomplete) evaluation guide is provided, along with a unified installer developed specifically for testing the Microsoft private cloud solution.
You also need Windows Server 2008 R2, so an optional 180-day evaluation copy is available to download, complete with Hyper-V to provide the required virtualisation platform.
Depending on the approach taken, you'll need to deploy this up to eight times — which, as it's a Microsoft product, could be costly. This won't deter customers with volume licensing agreements or those with TechNet or MSDN subscriptions. Alternatively, you can rearm the 10-day activation period, using a provided script, to continue with the evaluation. You can do this up to five times, which isn't perfect but does work — although we're not quite sure how it adds up to 180 days of evaluation. Fortunately everything else is covered with no extra licensing needed.
Machines: real and virtual
In terms of hardware, the evaluation guide reckons you can get away with just one physical server, so long as it's got at least four processors plus enough memory and disk space to host up to eight VMs, as shown in the diagram below:

Microsoft's Private Cloud Evaluation Software bundle requires at least one physical server and up to eight VMs, all running Windows Server 2008 R2
We'd recommend a newish server, and for our tests we opted to use two — an existing system configured as an Active Domain Controller plus a second, more powerful, system that we used as a Hyper-V host to run everything else.
Our main server had eight cores and 18GB of RAM, along with 500GB of RAID storage. We installed Windows Server 2008 R2 with the Hyper-V role on this system, opting for the full OS rather than Server Core. Next, using Hyper-V Manager, we built a new VM with two CPUs, 2GB of memory and a 40GB hard disk, onto which we installed Windows Server 2008 R2.
We used Sysprep to get this template VM ready for duplication before manually copying it and running through the setup procedure on each copy to build the seven virtual servers we required.