PRO Tips In Action

We have a VM where the load has been slowly growing over time.  It’s peak season is right around now and we started getting alerts from Operations Manager on Friday.  The contents of the alert were:

Alert Monitor:  PRO CPU Utilization

Alert Description
Source:  MTGWSVR001  CPU utilization in the virtual machine has reached critical levels. The threshold monitor for this virtual machine has detected that the average of %Processor Time has been exceeded.

Summary
This monitor tracks the average CPU utilization for the virtual machine. The average Processor Time has exceeded the threshold. (The default threshold is 90 percent.)

Causes
The virtual machine is consuming too many CPU resources for its configuration.

Resolutions
Update the virtual machine configuration to allocate additional virtual CPU resources. For information about configuring the CPU requirements for a virtual machine, see Virtual Machine Manager 2008 R2 Help”.

The monitor in question is the interesting bit.  We have Virtual Machine Manager (2008 or later) running and it is integrated with Operations Manager (2007 SP1 or later).  We have a Windows Server 2008 R2 Hyper-V cluster which is being managed by VMM.  PRO (Performance and Resource Optimization) tips is enabled on the master host group (the top level host group, containing child host groups).  This allows OpsMgr to feed virtualisation performance alerts to VMM and VMM will act on them.

When the VM started getting increased resource demands it needed to use more CPU.  Eventually it got to the point where the CPU was being maxed out.  The PRO tips monitor in question runs every 60 seconds.  It measures the CPU utilisation of the VM.  If 3 sequential samples are greater than 90% CPU utilisation the monitor will create an alert.  That alert will auto resolve when things quieten down – it is a monitor which is a state engine, i.e. aware of good and bad scenarios unlike a basic rule.

Because PRO tips was enabled VMM was able to move the VM from it’s current host to another host.  That move was done using Live Migration so there was no downtime associated with the move of the VM.  This means that other VM’s on the original host weren’t being deprived of resources.  Moving the VM to another, less utilised host, gave it more CPU resources that it could use.  Which host was best?  That was decided by VMM using Intelligent Placement, which I blogged about last week.

What I’ve just described was dynamic IT.  A problem was automatically detected and resolved using two System Center products working closely together.  I was alerted to the issue.  I didn’t need to do anything right there and then because the alert auto resolved immediately after the PRO tips live migrated the VM.  I talked to the customer of the VM and found out that this is peak season for them and CPU demands would be high.  We scheduled a maintenance window for early this morning.  The VM was power down, an extra virtual CPU was added and the VM was powered back up again.  Less than 5 minutes and now the VM has all the CPU it needs.

Mastering Virtual Machine Manager 2008 R2

A new book, Mastering Virtual Machine Manager 2008 R2, has been published by Sybex/Wiley covering the subject of VMM 2008 R2.  It is written by two members of the VMM product team so the facts contained will be good.  The product description reads as follows:

“One-of-a-kind guide from Microsoft insiders on Virtual Machine Manager 2008 R2!

What better way to learn VMM 2008 R2 than from the high-powered Microsoft program managers themselves? This stellar author team takes you under the hood of VMM 2008 R2, providing intermediate and advanced coverage of all features.

  • Walks you through Microsoft’s new System Center Virtual Machine Manager 2008, a unified system for managing all virtual and physical assets; VMM 2008 not only supports Windows Server 2008 Hyper-V, but also VMware ESXas well!
  • Features a winning author team behind the new VMM
  • Describes all the new and enhanced features of VMM 2008 R2 and devotes ample time to how it also supports top competitors VMware ES
  • Uses a hands-on approach, giving you plenty of practical examples to clarify concepts

Open this in-depth guide and discover techniques and processes you can put to immediate use”.

VMM 2008 R2 is a powerful tool.  I work almost exclusively from within it and OpsMgr 2007 R2.  The ability to manage a number of Hyper-V hosts, and ESXi/ESX and Virtual Server hosts, and leverage the library to speed up otherwise boring, time consuming and manual (i.e. mistakes) operations is worth the price alone.  On top of that, it adds more to Hyper-V.  I’ve seen several times over this past weekend how PRO tips and Live Migration have optimised the loads on our cluster when there were more-than-normal resource requirements.

If you’re interested in learning how to make the most of your Hyper-V platform then look into VMM.  If you want to learn about VMM 2008 R2 then a book written by members of the product team has to be the best place to start.

That Unmerged Snapshot Did More Than I Expected

Last month I blogged about how a Hyper-V snapshot had caused some difficulties.  I hadn’t realised how much effect that unmerged snapshot had.

We run OpsMgr and user it not only for fault monitoring but also for performance monitoring.  I noticed that sometime after we upgraded to OpsMgr 2007 R2 2 of our agents stopped gathering performance stats.  I couldn’t see live performance information in the OpsMgr console nor in the reports (from before a certain date).  PerfMon on the servers worked perfectly.

I repaired the agents and then re-installed them by hand.  Reboots were done.  The agents still refused to gather performance statistics. This was probably back in August/September.

I opened a PSS call under our support program to get some help when I ran out of ideas.  The problem made no sense to the PSS engineers because fault monitoring was working fine.  The machines in question were healthy.  I gathered countless logs and did countless tests.  The call ended up getting escalated not just once, but twice.  A few weeks ago I did some SQL queries on behalf of a PSS engineer.  We could see that performance data stopped being stored in the OpsMgr reporting database some time after the upgrade.

Other agents were fine.  We started focusing on comparing working agents with the 2 non-working agents.  Everything checked out so now we started getting particularly paranoid about things like service packs and regional settings.  I really didn’t like that because we hadn’t had any problems with these machines until maybe a month after we upgraded to OpsMgr 2007 R2.

I was getting ready to give up yesterday afternoon.

I don’t know why I did it, but I went into the OpsMgr console to have a peek at some performance stats for another agent.  One of the non-working agents was still selected from previous tests a while ago.  Wait … I could see a graph for CPU utilisation.  The agent was working.  I checked more stats for disk and memory.  They worked.  I checked the other non-working agent.  It was working.  Huh! 

I fired up the reporting console and did reports on the non working machines for the last year.  I had a complete graph with no data gaps.  That’s strange.  I did a report on when I “knew” that data wasn’t being gathered.  I had complete graphs with correct looking numbers of data samples.

So it appears that data was being gathered but it wasn’t being processed correctly.  Even when I couldn’t see the data in reports, graphs or SQL queries, the data was there somewhere in a pre-processing stage, waiting to be added into the relevant tables.

OK, what had changed in the last month or so since I had tried one of these reports?  We had migrated from Windows Server 2008 Hyper-V to Windows Server 2008 R2 Hyper-V.  Could there be a change in the way that performance data was gathered in a VM?  Definitely not.  Had we any changes at the VM level?  That’s when I remembered the issue in that blog post.

When I moved the OpsMgr VM, Hyper-V had to merge a snapshot that we had deleted some time before hand.  It had been running with the AVHD (snapshot/checkpoint differential disk) for 4 months.  It started to affect performance of the VM so badly that TCP was having timeouts.  There were performance issues that were virtual storage related.  Could it be that this affected database operations of the VM?  Of course they would if they had reached the point of messing up TCP.

NOTE: I have only ever used snapshots in production in VM internals upgrade scenarios.  I usually delete the snapshot after success is checked and allow a merge to take place.  That means there should be no impact on performance as long as you do things in a timely manner.  Some how I must have forgotten to do that this time. 

So here’s what I suspect happened.  The OpsMgr agents actually worked perfectly.  The gathered the performance stats the entire time and sent them to OpsMgr.  I am guessing that OpsMgr caches the data for processing.  Due to the unmerged AVHD/snapshot performance issues, the data stopped being processed correctly and sat in that cache.  We know it didn’t make it to the point of being reportable because a direct SQL query showed a data gap.  The problem reared it’s ugly head around a month after the snapshot was taken.  The AVHD/snapshot was merged back in early November and that resolved the performance issue for this VM.  It also sorted out whatever hitch there was in performance processing for these agents.  The data that was cached somewhere got it’s way into the reporting database and live graphs suddenly appeared for the two machines in the OpsMgr console.  That’s the funny bit; it only affected these two agents.

MS PSS are still curious.  The engineer seems to accept the explanation I’ve given him but he’s still curious to dig around and confirm everything, maybe try to see if he can get details on what happened internally.  I’ve got to credit him for that; most support staff would just close the call and move on.

So once again:

Hyper-V Snapshots or VMM Checkpoints, i.e. AVHD differential disks should not be used in production.  They are a form of differential VHD that doesn’t perform well at all.  They really do affect performance and I’ve seen the proof of that.  In fact they affect functionality in the most unpredictable of ways due to their performance impact.  Use something like DPM instead for state captures via backup at the host level.  That’s an issue right now with the lack of CSV support in DPM.  If you really need that right now then have a look at 3rd party providers or wait until DPM 2010 is released (approx April 2010) until you do deploy CSV.

Technorati Tags: ,,

Microsoft Acquires Opalis

It was announced today that Microsoft acquired a company called Opalis.  Opalis provides solutions to:

  • Cloud Bursting – automate public cloud provisioning to handle peak loads and prevent SLA violations
  • Cloud Cover – automate failover to public or private clouds
  • Private Cloud Operation – create and manage service driven, flexible capacity with automation
  • Sophisticated triggering – subscribe to external events to trigger workflow processes that add, reduce or fail-over to cloud resources according to policies and SLAs

I was wondering if this would be something that would be used solely in Azure.  But two things say “no” to me on that.  First is the System Center badge on the above site.  Second is the line “automate failover to public or private clouds”.  Think of Azure as a public cloud.  Think of a MS hosting partner running a Hyper-V based private cloud.  We already know that MS plans to add the ability to migrate VM’s to Azure from private clouds using VMM.  Now I guess they have technology to allow for an automated failover or DR plan, i.e. you can run your daily operations in one cloud and fail over to another cloud.

I can see the bursting and triggering tying in nicely with the OpsMgr/VMM integration provided by PRO tips, e.g. OpsMgr sees a bottleneck and Opalis technology in VMM triggers a new VM deployment to cater for the load.  When demand goes down then the burst VM’s are drained and withdrawn.  Sounds like a cool idea!

I wouldn’t expect to see this stuff appear for another 2 years.  We’ve just gotten VMM 2008 R2 and the Software Assurance cycle will next kick in around October/November 2011 (GA date, RTM being around August 2011).

Technorati Tags: ,

How Does VMM Place Virtual Machines?

How does Virtual Machine Manager know where to locate a virtual machine when it needs to migrate or you go to create one? 

If you don’t have VMM to manage your Hyper-V hosts then it becomes either 100% manual (when you manually migrate or create a VM) or 100% automated when there is a failover.  There is no in-system intelligence involved.

VMM does it very differently using Intelligent Placement.  The basic premise is that VMM is monitoring key resources on the Hyper-V hosts that it manages.  Using an algorithm that is either default or customised by you it will take those resources and know where to place a VM in one of a number of scenarios:

  • (Automated Placement) When a VM is created in the self-service console it is automatically place on a host by VMM based on the host ratings.
  • (Manual Placement) When you create a VM in the admin console it will recommend a host for you to choose. 
  • (Automated Placement) When there is a host failure VMM will use Intelligent Placement to move the VM to the highest rated host.
  • (Manual Placement) When OpsMgr and PRO tips initiate an alert, VMM will use Intelligent Placement to relocate VM’s to the host with the most available resources, i.e. the highest rated host.
  • (Automated Placement) When you drag and drop a VM to a host group the VM will be automatically placed on a host in that group based on host ratings.

You can alter how the Intelligent Placement algorithm works on your VMM server.  There are two basic models:

  1. Resource Maximisation: This is the model you take when you want VMM to make the very most out of each and every host.  VMM will try to place as many VM’s on a single host as is reasonable.
  2. Load Balancing: The goal here is to get the very best performance from your VM’s that you can.  VMM will locate VM’s in an effort to balance the resource utilisation across all hosts.

There are 4 basic resource types that will be utilised in the algorithm.  There is a slider to allow you to prioritise these resources when they are evaluated:

  1. CPU
  2. Memory (RAM)
  3. Disk I/O capacity
  4. Network capacity

To be honest I think most people will choose a load balancing model and will prioritise CPU.  Disk I/O and network capacity probably come next depending on where your bottlenecks are.  Those few going with the maximisation model will probably prioritise memory because it then likely becomes the bottleneck resource.

How do these host ratings get calculated?  VMM measures the resources of the host around every 10 minutes.  There are circumstances that change the available resources of a host and thus the rating of the host.  These are:

  • New Virtual Machine
  • Deploy Virtual Machine
  • Store Virtual Machine
  • Migrate Virtual Machine
  • Delete Virtual Machine
  • Virtual Machine Turned On
  • Virtual Machine Turned Off, Stopped, Paused, Saved State

The host is rated only when a VM is to be placed.  The gathered information is used to compare the host against the resources required by the new/moved virtual machine.  A rating is generated, anywhere from 0 stars to 5 stars in half star increments.  The host ratings do not involve comparing and contrasting hosts.  They simply show how suitable each host will be based on empirical data and an estimation of what resources that VM will require in the future.  In automated scenarios the host with the highest rating will be chosen.  In manual scenarios it’s up to the administrator to agree with or reject the recommendation.

A number of circumstances can cause a host’s rating to be zero stars, i.e. VMM believes the placement to be unsuitable:

  • There is not enough RAM available for the VM you want to place on a host.
  • There is not enough available storage for a VM, e.g. a Windows Server 2008 Hyper-V cluster does not have an available LUN for the VM.
  • The virtual network the VM is configured to use is not available on the host.
  • Some advanced VM configuration is not supported by the host, e.g. advanced networking or high availability.  You can still force a placement in this scenario by changing that setting when promoted by the wizard.

Intelligent placement is an estimation based on empirical data combined with the tuning of the algorithm.  It’s up to you to tune that algorithm to suit the VM’s, hosts and business requirements for your organisation.  VMM will then do it’s best by making recommendations to you when you move/create a VM or when an automated action must be performed by VMM.

Technorati Tags: ,

Offline Virtual Machine Servicing Tool V2.1

Microsoft updated this tool to include support for Windows Server 2008 R2 and VMM 2008 R2.  What does it do?

Roles.png

What it does is allow you to update VM’s that are offline and stored in your VM library.  A scheduled job runs, deploys the VM, updates it and stores it back in the library.

It does not work with templates unfortunately.  I have no need to store VM’s in the library but I do have a tidy little collection of templates stored away (MS just refers to them as VHD’s, templates are a different thing altogether in VMM-speak) and I have no choice but to update them by hand.

Version 2.1 of the tool now works with System Center Virtual Machine Manager 2008 R2, System Center Configuration Manager 2007 SP2, and Windows Server Update Services 3.0 SP2. The tool also supports updating the Windows® 7 and Windows Server® 2008 R2 operating systems.

VMM P2V Migration

Microsoft System Virtual Machine Manager (VMM) 2008 R2 includes the ability to do a P2V (physical-to-virtual) migration of Windows computers.  This is usually the last critical step in a normal virtualisation project – take those physical servers that an audit identified as being candidates to be converted into virtual machines.  The process scans the contents of the hard disk and converts them into VHD’s.  The machine specification is converted into a virtual machine configuration.

The first step in all of this begins really when you are doing a feasibility study or sizing your virtualisation hosts and storage.  You’ll run something like Microsoft’s MAP (Microsoft Assessment and Planning) toolkit.  Alternatively if you have already got Operations Manager 2007 deployed then you can install VMM 2008 R2 and wait a while before running the Virtualisation Candidates report.  That takes information from the continuous performance monitoring provided by OpsMgr.  Or you can just run individual performance reports from OpsMgr – but you need to be careful about seeing both the details and the big picture when it comes to a manual interpretation of the statistics.  And be careful about the process OpsMgr uses to store long term data.  Spikes or sudden drops may not be apparent by the data aggregation.

Once you have your Hyper-V 2008 R2 platform and VMM 2008 R2 tested, documented and in production then you can start your P2V process.

Here’s a list of the supported operating systems:

Operating System

VMM 2008

VMM 2008 R2

Microsoft Windows 2000 Server with Service Pack 4 (SP4) or later (offline P2V only)

Yes

Yes

Microsoft Windows 2000 Advanced Server SP4 or later (offline P2V only)

Yes

Yes

Windows XP Professional with Service Pack 2 (SP2) or later

Yes

Yes

Windows XP 64-Bit Edition SP2 or later

Yes

Yes

Windows Server 2003 Standard Edition (32-bit x86)

Yes (Requires SP1 or later.)

Yes (Requires SP2 or later.)

Windows Server 2003 Enterprise Edition (32-bit x86)

Yes (Requires SP1 or later.)

Yes (Requires SP2 or later.)

Windows Server 2003 Datacenter Edition (32-bit x86)

Yes (Requires SP1 or later.)

Yes (Requires SP2 or later.)

Windows Server 2003 x64 Standard Edition

Yes (Requires SP1 or later.)

Yes (Requires SP2 or later.)

Windows Server 2003 Enterprise x64 Edition

Yes (Requires SP1 or later.)

Yes (Requires SP2 or later.)

Windows Server 2003 Datacenter x64 Edition

Yes (Requires SP1 or later.)

Yes (Requires SP2 or later.)

Windows Server 2003 Web Edition

Yes

Yes

Windows Small Business Server 2003

Yes

Yes

Windows Vista with Service Pack 1 (SP1)

Yes

Yes

64-bit edition of Windows Vista with Service Pack 1 (SP1)

Yes

Yes

Windows Server 2008 Standard 32-Bit

Yes

Yes

Windows Server 2008 Enterprise 32-Bit

Yes

Yes

Windows Server 2008 Datacenter 32-Bit

Yes

Yes

64-bit edition of Windows Server 2008 Standard

Yes

Yes

64-bit edition of Windows Server 2008 Enterprise

Yes

Yes

64-bit edition of Windows Server 2008 Datacenter

Yes

Yes

Windows Web Server 2008

Yes

Yes

Windows 7

No

Yes

64-bit edition of Windows 7

No

Yes

64-bit edition of Windows Server 2008 R2 Standard

No

Yes

64-bit edition of Windows Server 2008 R2 Enterprise

No

Yes

64-bit edition of Windows Server 2008 R2 Datacenter

No

Yes

Windows Web Server 2008 R2

No

Yes

You can use the Microsoft Virtual Server 2005 Migration Toolkit (VSMT) or third-party solutions (cloning, e.g. s/w from Acronis is said to be a successful approach) for converting computers running Windows NT Server 4.0.

As if that isn’t complicate enough then you have to consider how you are going to do the P2V process.  There are two approaches:

  • Online: VMM will deploy an agent to the machine to be converted.  This is a temporary installation and does not require a license for the agent.  The agent scans the machine for suitability for an online conversion.  Upon success it will then use the Volume Shadow Copy Service (VSS) to grab file cleanly from the computer to create a new VHD for each disk in the machine.  VSS is used because things like OS files, Exchange files, SQL files, etc can be copied cleanly.  There’s a few catches with this.  (1) Not every version of (older) Windows has suitable VSS support.  VSS is a relatively new technology still.  (2) A P2V conversion is not instant.  It takes time, during which some files, particularly database files like Exchange or SQL will change after they have been copied.  That means the new VM won’t have all the data. (3) Not all server applications, e.g. MySQL or Oracle, have a VSS writer/engine.  They cannot be grabbed cleanly.  Once an online conversion is complete the source computer is left running.
  • Offline: With this process VMM deploys a boot image (Windows PE) to the machine to be converted.  The machine is reconfigured to boot from the boot image. The P2V job then runs.  The complication with this approach is that you must ensure that all the required drivers for the original physical machine must be in your boot image.  You can use the “Use storage and network drivers from the following location” option to supply additional drivers.  Because WinPE is used the physical machine must have at least 512MB RAM.

Should you use and online or offline conversion process?

Operating System on Source Computer

P2V (Online)

P2V (Offline)

Not Supported

Microsoft Windows 2000 Server Service Pack 4 (SP4)

 

X

 

The Windows Server 2003 operating systems with Service Pack 1 (SP1)

X

X

 

The Windows Server 2003 R2 Standard Edition operating system

X

X

 

The Windows XP operating systems with SP1

X

X

 

The Windows Server 2003 R2 Standard x64 Edition operating system

   

X

The Windows XP Professional x64 Edition operating system

   

X

The Windows Vista operating system

   

X

The Microsoft Windows NT Server 4.0 operating system

   

X

Again, you can use a cloning solution to work with those unsupported operating systems.

Here’s another basic rule of thumb:

  • Any machine with static data (web server) can be safely done with an online conversion.  The server stays operational and responsive to users.
  • Any machine with changing data (domain controller, Exchange, database, file, etc) should be converted with the offline approach to avoid data loss.  It does mean taking the server offline during an announced outage window.

Is there any preparation work you should do?  Yes.  Remove unwanted files.  Defrag the hard disk (schedule it in Windows Scheduled tasks, e.g. defrag C:).  Finally, remove any hardware integrated software, for example a HP server should have the HP ProLiant Support Pack from the server prior to conversion.  Failing to remove hardware integrated software will cause the new VM to blue screen or have failing services at start up.  You can do a safe mode boot and uninstall the relevant software after the P2V conversion.

When the process runs a new dynamic VHD is created by default for each physical hard disk.  You cannot reduce the size of these disks.  If you need them to be smaller then use a 3rd party solution to do this before the conversion.

When the job is complete VMM will add the Integration Components.

What about a strategy?

  • Identify virtualisation candidates.
  • Identify required drivers for offline conversions and add them to your VMM driver pool.
  • Prepare the physical computer, e.g. do a defrag and double check anti virus, etc.
  • Make sure all backups of the physical computer have worked OK and that you can recover from any disaster.
  • Maybe do an online conversion to test the process for the server in question.  Place the new VM on a test virtual network.  Make sure it boots up OK and performs OK.  This won’t affect the production physical server.
  • Perform final P2V preparations, e.g. uninstall hardware integrated software.
  • Perform a suitable conversion (probably offline)of the physical computer.  Leave it offline.  Bring the VM online and test it.
  • Put the new VM into production.
  • Make sure backups are working OK for the new VM.
  • Leave the physical server powered off for a pre-agreed timeframe before removing/recycling the physical computer.  You never know what will happen, e.g. require a
  • reversal of the process to V2P (not in VMM) of the server.

Notes:

  • FAT/FAT32 cannot be converted using Online P2V
  • You can do a P2V of virtual machines, however VMware users will want to use the V2V approach.
  • You cannot do a P2V of an in-place cluster.  However you can convert each cluster node and then create a new failover cluster.

Technorati Tags: ,,

Virtualisation Made A Server Replacement Easy

I’ve been running a “security” server for years in different jobs.  It’s a server that runs several security roles, for example, SUS and then WSUS, antivirus, certificate services, etc.  Very often these are different servers, quite unnecessarily eating up resources and licenses.

In my current job, our security server started life as a x86 Windows Server 2003 1U rack server.  Not long after the launch of our Hyper-V based private cloud, I ran a VMM 2008 P2V job to convert that machine to be a virtual machine, freeing up the hardware for other purposes.  This was quite appropriate.  These sorts of servers are usually very lightweight. 

Earlier this year I decided to upgrade the machine to Windows Server 2008.  That was easy and safe.  I took a snapshot (knowing I had space on the LUN) and performed the upgrade.  Now it was running W2008 x86.  The upgrade went well.  If it hadn’t I could have easily applied and then deleted the snapshot to return the machine back to W2003.

I now faced a challenge now.  The next upgrade would be to Windows Server 2008 R2.  W2008 R2 is a 64-bit operating system and you cannot upgrade from 32-bit to 64-bit Windows.  There was only one choice – a rebuild.  Virtualisation made this so easy – and VMM 2008 R2 made it easier.

We have a Hyper-V lab server.  I use it to prep new images, test security updates, and to try out scenarios and solutions.  I deployed a VM running W2008 R2 Enterprise edition onto the host and configured the VLAN ID for our test network.  Enterprise edition would allow me to run customised certificates for OpsMgr usage.  Here I could specify the computer name to be the same as the machine I would eventually replace and prepare it identically to the original – excepting the operating system version and architecture.  On went SQL Express 2008 SP1, our antivirus and prepare those services.  Downloads, approvals, patching, etc were all done.  Meanwhile, the production server was still operating away with customers unaware it was to be replaced.

Eventually it was ready.  I powered it down.  I removed the OpsMgr agent from the original server and then used VMM to move that VM elsewhere.  I used VMM to move the new VM onto the desired host.  All that was required now was to change the VLAN id, boot it up, join it to our management network domain and deploy the OpsMgr agent.  10 minutes of service downtime in total to completely replace a server.   Not bad!  I went on to add Certificate Services after the domain join.

I’m leaving the original VM to one side just in case there’s a problem.  If so I can bring it back – but that would then require some ADSIEDIT surgery to remove the certificate services configuration.  So far, though, so good.

Performance Tuning Guidelines for Windows Server 2008 R2

Microsoft has updated the Performance Tuning Guidelines document to include W2008 R2.  It covers all aspects of the server operating system but I’m going go focus on Hyper-V here.

The guidance for memory sizing for the host has not changed.  The first 1GB in a VM has a potential host overhead of 32MB.  Each additional 1GB has a potential host overhead of 8MB.  That means a 1GB VM potentially consumes 1056MB on the host, not 1024MB.  A 2GB VM potentially costs 2088MB on the host, not 2048MB.  And a 4GB VM potentially costs 4152MB, not 4096MB.

The memory savings for a Server Core installation are listed as 80MB.  That’s seriously not worth it in my opinion given the difficulty in managing it (3rd party software and hardware management) and troubleshooting it when things go wrong. “Using Server Core in the root partition leaves additional memory for the VMs to use (approximately 80 MB for commit charge on 64-bit Windows)”.

RAM is first allocated to VM’s.  “The physical server requires sufficient memory for the root and child partitions. Hyper-V first allocates the memory for child partitions, which should be sized based on the needs of the expected load for each VM. Having additional memory available allows the root to efficiently perform I/Os on behalf of the VMs and operations such as a VM snapshot”.

There is lots more on storage, I/O and network tuning in the virtualization section of the document.  Give it a read.

Can You Install Hyper-V in a VM?

The answer is sort of.  Strictly speaking it is possible.  You can indeed enable the Hyper-V role in a Server Core installation of Windows Server 2008 and Windows Server 2008 R2.  I’ve done it on both OS’s on both VMware Workstation 6.5 and on Hyper-V.  Logically this means you can deploy Hyper-V Server 2008 and Hyper-V Server 2008 R2 in a VM.

You can even create VM’s on the hosts.  However, the hardware requirements are not passed through to the VM’s and therefore the hypervisor never starts up.  That means you cannot start up those VM’s.

Why would you care?  You certainly cannot do it in a production scenario.  But you might find it handy when doing some demos, lab work or testing of clustering or VMM.

EDIT:

I have been told (but I have not tried this so I cannot say it will work) that you can get Hyper-V to install and run in an ESXi 3.X virtual machine.  The performance is said to be awful, but might be useful for a lab with limited hardware.