Hyper-V: Can I Virtualise Everything: Domain Controllers?

I’ve seen this one a few times on forums and I’ve been asked it at sessions I’ve presented at.  People are deploying Hyper-V in medium and large businesses and they are wondering if they should virtualise absolutely everything in their data centre.

The answer is no. 

Let’s start with the obvious.  Some applications or operating systems may not have vendor support for virtualisation.  If that’s the case then you shouldn’t virtualise them.  However, many still do and they get by with no negative impacts.  Okey dokey.

Some servers just require too many resources to consider for virtualisation.  Consider a data warehouse application.  If you virtualise it, it might require a 1 VM per host deployment.  For the vast majority of us that’s a bad idea.  However some might like it because it means the machine is abstracted from the hardware.  But remember that you can only have a maximum of 4 virtual processors in a Windows Server VM on Hyper-V.  That likely won’t be enough for any machine that needs 32GB or 64GB RAM.

Then there’s domain controllers.  You can virtualise domain controllers but you have to be very careful.  Basically you have to treat them as you would physical domain controllers.  Checkpoints/saved states and host level backup is a bad idea for domain controllers because of the risks of AD corruption, e.g. USN rollback.  Microsoft takes the idea of virtual domain controllers very seriously and has a very long support article on it.

Should you virtualise all of your domain controllers?  Typically I will say no to this.  There’s a few exceptions, e.g. virtualised SBS running on a workgroup member Hyper-V host.  But take a Hyper-V cluster.  The presence of AD is a requirement of a Hyper-V cluster.  What happens if you need to power down your entire cluster for maintenance or power suddenly cuts out.  These things happen.  Electricians might need to work on power board or a UPS/generator might fail to kick in.  I’ve seen both take place in the past.  What happens to that cluster if all of the DC’s are virtualised on the cluster?  The cluster relies on AD for authentication/authorization.  Things will fail.  It’s a chicken and egg scenario.

Microsoft recently blogged about this.  The workaround solution is to find the LUN where the VHD(s)  for a DC with DNS role installed and configured is located, copy that to a temporary workgroup Hyper-V server and set it up to boot up.  Now you can power up the cluster.  But you have to be really careful and make sure that original DC VM doesn’t start up and cause a mess.

The advice is to have at least one physical DC.  When I did my ESX 3.X training a few years ago the advice was the same when running Virtual Center.  I recommend having 2: Murphy tends to like to mess up plans and wouldn’t it be a bad day if both the cluster powered down and your lone physical DC wouldn’t start up?  Alternatively you can run those DC’s on a separate workgroup host but that just complicates things in terms of virtualisation management.  I like to keep things simple so I’d go the 2 physical DC route.  Then you can safely virtualise other DC’s while sticking to Microsoft’s advice on the subject.

Hyper-V Snapshots _Are_ Supported in Production

I’ve stated numerous times that Hyper-V snapshots (AKA VMM checkpoints) are not supported in production.  This was based on what I had been told by members of staff at MS PSS.  Well, I got corrected on that last night by a senior member of the product teams in Redmond. 

Snapshots are supported in production.  The qualification is that you need to know what you are doing and realise that there are side effects.

Browse back through my blog and you’ll see how I’ve seen massive side effects and drops in performance.  I’d certainly not recommend to anyone that they use snapshots in production.  But MS will support you if you do.

By the way, Microsoft does not support the use of snapshots on virtual machines running Active Directory Domain Services (domain controllers) or the Active Directory Lightweight Directory Services role.

Technorati Tags: ,

Hyper-V Backup Strategies

Because you are dealing with virtual machines you have more options available to you than you did when backing up traditional tin servers.  What approach you take depends on whether you need to recover files, databases or just an entire server, what your budget is and how you configure the storage of your VM’s.  Oh yes, and your budget.

In-VM or On-Host Backup?

What does that mean?  There are two places you can do your backup from. 

On-Host Backup

This allows you to capture selected VM’s on the host as they are running.  There’s some catches to that which I’ll come back to later.  The benefit of this approach is that it’s a simple hammer that can hit everything.  If you need to recover all of your VM’s then you can do it.  But you have no knowledge of the VM’s contents nor the ability to recover single files from within the VM.  To do that with this approach you have to recover the entire VM to an isolated network, log into the VM, and then grab the files you need.

This on-host backup really needs to be Hyper-V aware, i.e. use the Hyper-V VSS (volume shadow copy service) writer.  When your backup software tries to backup the VM then the VM will be quickly brought to a “quiescent” state.  This is accomplished at two levels.  The parent partition uses VSS to access the VHD files.  The integration components feature a backup integration.  This allows the VSS writers in the VM to bring file services, Exchange, SQL (and any other VSS aware services) into a brief restful state too.  A snapshot of the VM can then be taken using VSS and the backup software get’s the VM’s running state.  Note that this quiescent state is not noticeable.  Odds are you are already using this VSS technology to backup Windows file servers, Exchange and SQL and haven’t noticed a thing.

You probably noticed a catch here.  The backup causes no noticeable downtime to the VM if (a) VSS is available in the VM operating system and (b) the backup integration component service is running in the VM.  That means you must be running Windows Server 2003 SP3 or later in the VM and you have installed the IC’s and left the backup integration service enabled.  All of the volumes in the VM must also have VSS enabled.

If you have VM’s that don’t meet both of those requirements then they must be stopped (saved state) before a backup can commence.  This will include, for example, VM’s that meet these conditions:

  • VM’s that do not have the VSS service, e.g. Linux or Windows 2000
  • VM’s that do not have the IC’s installed and the backup integration service enabled
  • VM’s that do not have VSS enabled on all of their volumes.

Some types of storage cannot be backed up in this way.  Passthrough storage is not a file like a VHD so that is excluded from this approach.  And you need to be aware of remote storage that is directly connected to the VM.  It is not connected to the parent partition so it cannot be backed up with this approach.

You should also be aware that virtual network configurations are reportedly not backed up with this approach.

However the two big benefits are:

  • You can do an “iron”-level backup of a VM.  If you lose the VM then you can instantly restore it to a known state with no need to build new VM’s, install software, patches, etc.
  • As I’ve mentioned you should not use snapshots in production.  Using a VSS backup on the host you effectively get snapshot functionality.

In-VM Backup

The second approach is to do an in-VM backup.  This is pretty much doing what you’ve always done with your physical servers.  You log into the VM and do the backup from there.  Here are the benefits:

  • You can use whatever backup tool you want that is installed in the VM.  It does not need to be Hyper-V VSS aware.  Although it doesn’t need to be Hyper-V VSS aware you should take steps to ensure you can still backup open files and backup databases (mail, Oracle, MySQL, etc) consistently.
  • You can backup remote storage that is not connected to the host, e.g. where a VM directly connects to iSCSI storage.
  • You can use this approach for Linux/Windows 2000/etc and where you do not (or cannot) install Integration Components, do/cannot not have VSS enabled on all volumes or do not/cannot enable the backup integration service.
  • Best of all, this approach allows you to selectively backup files and allows you to selectively recover files or databases.  This is because the backup is in the VM and thus is aware of the data in the VM.

Recovering a lost VM with just this approach will be time consuming.  You would have to:

  • Build a new VM and set up the operating system to be identical to the previous version including service pack.
  • Do a complete restoration of the backup data.
  • Test like crazy to ensure everything is OK.

Best of Both Worlds

The best solution is to do both types of backup.  You can do an on-host backup maybe once a day, once a week or once a month for all VM’s, depending on major changes on those VM’s.  Identify those VM’s that you need to backup/recover on a granular level, e.g. shared SQL servers, Exchange, file servers, etc.  For those machines you should configure in VM backup.  Of course, there are those VM’s that don’t meet the requirements for on-host backup.  Exclude them from the backup set and set up in-VM backups for them.  It might make sense to do an on-host backup once in a while for these VM’s.  This will require a scheduled maintenance window where you put the VM’s into a saved state to run the backup.  This will allow quicker recoveries in a major disaster for these VM’s.

Here’s how you can handle various recoveries now:

  • VM destroyed: Recover the last backup of the VM from the host level.  Restore data from in-VM backup that has changes since that on-host backup.  This will bring the VM back up to date, e.g. SQL databases.
  • Data lost from a VM, e.g. SQL database, files, etc: Recover the data from the in-VM backup.
  • Host destroyed/Office Destroyed: Recover the complete on-host backups to another host or another host in another office.  Remember to configure the virtual networks.

Backup Tools

If you are operating on a shoestring then the solution for you is Windows Server Backup.  You can use this to backup your host and VM’s.  It’s not the prettiest solution but it works.  VM’s that are backed up at the host level that are not compliant with all the requirements will need to be put into a saved state either manually or via a (PowerShell) script.  In VM backup is complicated because you need to provide storage for the backups.  That means using either iSCSI or VHD’s and that adds complexity to your storage solution.

The ideal solution in a Microsoft centric network is Data Protection Manager.  DPM 2007 SP1 can backup Windows Server 2008 hosts and clusters.  It can also backup Windows Server 2008 R2 hosts and clusters.  However the caveat for Windows Server 2008 R2 clusters is that it cannot backup VM’s that are stored on Cluster Shared Volumes (CSV) and it is not Live Migration aware.  DPM 2010 (expected to RTM in Q2 2010 and in beta now) will resolve that.

DPM installs agents on the host and in the VM’s.  Licensing costs are reduced with System Center Enterprise (host and 4 VM’s on the host) and Datacenter (host and all VM’s on the host) CAL’s/SAL’s.  You can configure protection sets with schedules of your choice and your hosts/VM’s/data will be backed up to the disk storage set(s) on the DPM server.  For those VM’s that are not compliant with the Hyper-V VSS/IC requirements, DPM will automatically put them into a saved state and do the backup.  A nice touch with DPM is that it will allow replication of the backed up data to another DPM server.  This could be in a remote location, e.g. a hosting company, and have a tape drive attached to stream data from disk to tape for archival purposes.  DPM is quite clever with backups.  It backs up at a block level.  It only backs up differences rather than entire files.  It can also compress data on the wire.

What if you’ve made an investment in other backup technologies and want to keep it simple or you have lots of non-Microsoft technology?  You have a few options:

  • If your backup vendor has Hyper-V VSS compliance then do what I’ve talked about above, picking and choosing between in-VM and on-host backups.  Windows Server 2008 R2 CSV is still pretty new so verify that the vendor also has compliance for that if you are deploying an R2 Hyper-V cluster.
  • If your backup vendor does not have Hyper-V VSS compliance then you can only do in-VM backups.  It’s not ideal but it’s what you’ve been doing up to now with your physical servers so nothing has changed.  You’re just not able to take advantage of snapshot style functionality at the host level for your VM’s.
  • Maybe add DPM into the mix for host-level backups only and do daily/weekly/monthly backups.  That way you get an “iron” level backup of the VM for those dreaded scenarios when you have to do a complete recovery.

Things To Watch Out For

  • Patches.  No matter what your backup solution is, get all of the latest patches.  DPM 2007 SP1 requires a hot fix for W2008 Hyper-V support.  Install the June 2009 rollup.  DPM 2010 requires a hotfix on W2008 R2 Hyper-V RTM clusters too.
  • DPM 2007 SP1 isn’t the completed solution for W2008 R2 clusters due to the lack of support for CSV and lack of Live Migration awareness.  If you are deploying DPM 2007 SP1 on W2008 R2 clusters then have your licensing set up to upgrade to DPM 2010 next year.
  • The Windows Server Backup approach requires a registry change on the host.  Complete instructions are on the MS site.
  • Even if you only do in-VM backups, ensure your vendor will support it.  Just because it’s in VM and should be pretty much identical to backing up a physical box, it doesn’t mean the vendor will actually support a VM backup.
  • Test the crap out of this stuff once you have a lab or a pilot set up.

Scott Lowe/TechRepublic: Feature Comparison Between Hyper-V and vSphere

Scott Lowe did a very nice job in this short and objective article on TechRepublic where he compares the features of Microsoft Windows Server 2008 R2 Hyper-V and VMware vSphere.  Importantly, he distinguishes between the paid-for editions of the products.  As they say, a picture paints a thousand words:

Thanks Scott and TechRepublic.

Technorati Tags: ,

Looking Into “9 Reasons Enterprises Shouldn’t Switch To Hyper-V

I’m not here to blow Microsoft’s trumpet.  I’m not a MS employee, don’t own shares and, to be honest, they have a billion dollar marketing engine and Jerry Seinfeld to do that for themselves.

But when I read something like InformationWeek’s “9 Reasons Enterprises Shouldn’t Switch To Hyper-V” by Elias Khnaser then I have to say something.  Let’s go through this point by point.

1) Breadth of OS Support

Referring to non-Microsoft OS’s “Hyper-V, however, supports only Windows and SuSE Linux”

Actually it also supports Red Hat Enterprise Linux.  And the IC’s have been released under GPLv2 and are finding their way into other Linux distros as I type this.  Hey Elias, seeing as you aren’t a fan of Microsoft, I guess you don’t Bing. Try Google and do some research next time.

2) Memory Management

“For starters, it recommends having a host in standby mode, which means, ‘Have a host that is not serving VMs running so that in the event of a host failure, the standby host can be used to cover for its martyred cousin’.”

This is known as host fault tolerance.  If a host fails then you automatically fail over the VM to another host.  It isn’t unique to Microsoft.  Xen and VMware do this too.  You allow for a spare host or two (depending on the size of the cluster and fault tolerance required) so that if a host fails you don’t lose your VM’s.  It’s a GOOOOOOD thing.

“If you don’t have memory oversubscription, how exactly do you expect to power-on VMs when a host experiences hardware failure?”

Yes, Hyper-V does not have memory over subscription or RAM bursting.  Memory oversubscription is not supported in production by VMware.  If something goes wrong you are told to turn it off by VMware support as step #1.

3) Security

“Hyper-V’s reliance on a general-purpose operating system, in this case Windows Server 2008, makes it a security vulnerability unto itself”.

Oh really?  How many breakout attacks has Windows Hyper-V had?  Or Microsoft virtualisation full stop?  Zero.  How many have VMware had on ESX in the last 2 years?  1.

How many Microsoft patches for Hyper-V or Service Packs have broken virtualization or lost VM’s in the last 2 years?  None.  How many updates have broken ESX hosts in the last two years?  At least two, including some Update 1 for ESX 4 which was withdrawn last week.

How easy is it to patch a Windows Server 2008 R2 cluster?  It’s a doddle with WSUS.  ESX or Xen?  I doubt it’s so easy.  Heck, an ESX patch is a complete OS upgrade.

If you so choose you can run Hyper-V Server 2008 R2 or a Core installation of Windows Server 2008 R2 to reduce the patching footprint.  I choose to go with a full OS for hardware troubleshooting reasons.  If some hardware breaks on my hosts I’ll ID it in no time at all – heck the OpsMgr HP Insight Manager management packs make that easy but I can also use the HP on-server tools in a GUI.

4) Live Migration

“Considering Microsoft’s frequent weekly updates for Windows Server 2008, that would take an administrator double or triple the time it would an ESX admin just to move VMs from host to host in order to apply security patches and properly secure his deployment”.

Really?  All VMware implementations can have multiple VM’s fail over at once on 1GB Ethernet?  Seriously, I wasn’t aware that this was possible.  Does the VMware solution require 100% host fault tolerance with VM shadowing for this?

Hyper-V allows you to initiate multiple Live Migrations at once but they are sequential.

Wait a second: “Considering Microsoft’s frequent weekly updates“.  MS normally releases updates every second Tuesday (Wednesday for those of us in Europe and east of here).  And if you use any sort of patch management then it’s up to you when you do that patch deployment.  Using VMM 2008 R2 you can put a clustered host into “maintenance mode” and go do something else for a while.  The VM’s will be moved automatically to hosts selected by Intelligent Placement.

5) VM Priority Restart

“If you intend on running all virtual—and you should—the ability to prioritize your VMs by importance is crucial, and the ability to recover from host failures based on VM importance is even more crucial”.

When I restart a standalone (un-clustered) Hyper-V host I actually do have VM start prioritisation.  You can specify how long after the parent partition boots up that each VM should start up.

“In the event a host that is running 60 VMs fails, for example, I want to make very sure that my virtual infrastructure can restart my failed VMs on another host in a certain order”.

I’ll grant you that one.  For a workaround I suspect you could do this if using VMM.  Specify a priority value in the VM custom properties in VMM.  Write a PowerShell script to gather the names of all non-running VM’s on that host.  Query those VM’s for the custom value.  Order the start-ups by that value.

“I don’t want Exchange, SQL, and IIS to come up before my domain controllers, DNS server, or DHCP servers”.

We who work in virtualisation call that chicken and egg.  I think you’ll find that VMware recommend that there should be at least one physical domain controller.  I certainly would advocate that, e.g. Hyper-V/VMM work best in a domain and why start up the hosts before the DC’s?

6) Fault Tolerance

“This feature takes system availability to highs that are truly unheard of, and to no one’s surprise, it is available only with vSphere. The ability to run a single VM in lockstep with a shadow VM simultaneously, executing on both primary and secondary VMs at the same time, provides for continuous high availability that we never had in the physical world with this much ease.”

OK, which is it for you Elias?  All the fault tolerance in the world or not spending money on hosts.  Go back to the quote on point 2 and you’ll see you are contradicting yourself.

Actually, you can do Live Migration between sites with Hyper-V.  It leverages hardware solutions from the likes of Compellent or HP LeftHand to create a cross-WAN/campus CSV and then do Live Migration across that.  EMC has something for their Clarion and HP have CLX for the EVA but they don’t support CSV yet.

7) Hot Adds

“In a virtual environment, however, there should be no reason why we cannot add more memory, disk, and peripherals on the fly to any powered-on VM. Except if you’re using Hyper-V”.

You can hot-add SCSI disks in Windows Server 2008 R2.  You just need to have added the virtual SCSI controller.  Hot add of RAM is not possible.

8) Third-Party Vendor Support

“However, when we examine the third-party tools that support Hyper-V and those that support vSphere, the gap is significant and swings heavily in VMware’s favour”.

That’s probably true.  But quantity does not equate to quality.  There are one or two partners I’d like to see supporting Hyper-V that aren’t.  But I’ll tell you this much, Microsoft’s more open approach sure seems more appealing than the “don’t dare compete with us” approach displayed by VMware at their conferences toward their partners, e.g. Veeam daring to back up VM’s on ESXi.

And anyway, I have solutions available to me for anything I need to do on Hyper-V/VMM.

9) Maturity

“When choosing a virtualization infrastructure, you are making a strategic decision about the basis upon which your organization’s critical systems are going to run. It is a decision that will have far-reaching consequences; this is not some piece of software that you can just decide to change half way through the project”.

Hyper-V has such a small footprint that maturity isn’t a big deal.  Does Hyper-V/VMM have all the bells and whistles of VMware’s ESX/vSphere?  Nope.

Here’s the facts about Hyper-V/VMM.  They are rock solid.  18 months of usage and no stability or performance issues.  Manageability is easy thanks to VMM and OpsMgr.  My job is easier thanks to them.  I’m excited about how well Hyper-V/VMM have worked out and about the future.  The new stuff coming from the Opalis acquisition, where things are going with Azure integration, server application virtualisation (independent of the OS), and the potential for leveraging boot-from-VHD for V2P based on performance monitoring … it’s all going to be fun over the next two years.

I wish journalists like this guy would do some research before they write.  These articles are misleading.

Microsoft Releases Hyper-V Walkthrough Guide

Microsoft has released a document to help you get to know Hyper-V in a lab or pilot test environment.

“This guide provides detailed step-by-step walkthroughs for testing Hyper-V with Windows Server 2008 R2 in a preproduction environment. You can use this guide to become familiar with Hyper-V and the process of creating and managing virtual machines. This guide also includes scenarios that you can test to better understand how Hyper-V can address the business goals of your organization”.

HP Updates Sizing Tool For W2008 Hyper-V

HP has released an updated version of their Hyper-V sizing tool to include Windows Server 2008 R2 Hyper-V.

“The HP Sizer for Microsoft Hyper-V 2008 R2 is an automated, downloadable tool that provides quick and helpful sizing guidance for “best-fit” HP server and storage configurations running in a Hyper-V R2 environment. The tool is intended to assist with the planning of a Hyper-V R2 virtual server deployment project. It enables the user to quickly compare different solution configurations and produces a customizable server and storage solution complete with a detail Bill of Materials (BOM) that includes part numbers and prices.

The HP Sizer for Microsoft Hyper-V 2008 R2 allows users to create new solutions, open already existing solutions, or use other types of performance data collecting tools, such as the Microsoft Assessment and Planning tool (MAP), to build rich Hyper-V R2 configurations based on HP server and storage technology. The tool allows rapid comparison of Hyper-V R2 characterizations using various HP server and storage choices”.

It is available for download now.  An older version for Windows Server 2008 is still available.

VMM Reporting

System Center Virtual Machine Manager can be integrated into System Center Operations Manager.  Using the information gathered by OpsMgr agents on hosts, virtual and physical machines you can gather information that is relevant to VMM:

image You can see the reports above that are available when you are using Virtual Machine Manager 2008 R2.

Host utilization is a report you will run to see what the current resource usage is on that host.  Host utilization growth is similar.  What you will do with that report is specify two time frames.  The utilisation of the host in the second time frame will be compared with that of the first.

Virtual Machine Allocation is a summary report of the total resources used by virtual machines on your managed hosts.  Virtual Machine utilisation give you more detail.

imageYou can see in this screenshot the utilisation of resources by specific virtual machines.  Note that I have blacked out the VM names and the host names.  Some of the VM’s also do not have OpsMgr agents and therefore are not producing performance stats that can be used in this report.

Finally you have the report that’s going to be popular with most virtualisation implementations.  If I was doing a traditional internal deployment of Hyper-V I would first deploy OpsMgr 2007 R2 and it’s agents to gather Windows Server performance information.  Next I would deploy VMM 2008 R2.  I would let them stew on information for a week before sizing the hosts.  Then I would run the last of the reports: Virtualization Candidates. 

imageWith this report you specify a time frame and a set of criteria.  I’ve blacked out the names of the physical machines in this report.  You’ll use these performance criteria to dictate what is acceptable for a virtual machine candidate:

  • Number of processors (Hyper-V supports a max of 4 virtual CPU’s in a VM)
  • Processor speed
  • Maximum CPU usage
  • Average CPU usage
  • Total RAM
  • Average RAM usage

From this report you can ID your P2V candidates and then use VMM to convert those physical machines to virtual machines.

Technorati Tags: ,,