WS2012 – Enabling Services To Start When A VM Can’t Get Enough Dynamic Memory

The Performance Tuning Guidelines for Windows Server 2012 document is available and I’m reviewing and commenting on notable text in it.

I normally advise that the startup amount of memory in a Dynamic Memory virtual machine is set to whatever is required to get the services up and running.  This Microsoft document has another approach:

  • Set the VM to start with some small amount
  • Configure the paging file to be able to live up to any additional requirements – the paging file maximum size being 3 times the paging file’s initial size

Now if a VM cannot get enough physical RAM, it’ll page internally.  Before the questions come in, this is different to how VMware pages; host level paging has no knowledge of prioritisation or usage of memory pages inside a VM. Using the Microsoft approach, the guest OS has complete knowledge of how to prioritise and page in/out memory to suit what is going on.

If you are sizing hosts/VMs appropriate then VMs should always get enough RAM. But I suppose there might be rare circumstances where a number have hosts in a cluster are offline and you have to squeeze more out of your physical RAM.

RTM Week! Much Better Than Shark Week If You Ask Me

Although I would have expected the marketing people to wait for 8/8 to RTM Windows 8, they did previously announce RTM would be in the first week of August so that gives them from today (the 1st) until the 7th. And as I tweeted yesterday, Windows 8 product keys have appeared in the Microsoft Volume Licensing Service Center.

Watch for blog posts or news releases from Microsoft at 8am PST and 10am PST. I seem to remember Windows RTM meetings are usually early in the morning, but this Sinofskian release might be quite different to the past.

RTM does not mean that Windows 8/Server 2012 will appear on MSVL/MSDN/TechNet straight away. I think Vista took an age to spread out via the various networks. And I think Windows 7 was instantly available.  Developers will be critical to the success of Windows 8, so surely MSFT will give them access to RTM code on MSDN as quickly as possible?

 

 

What Windows Server 2012 and Hyper-V Are Called

There are no such things as:

  • W2012
  • Windows Server 8.  That was the old codename before the official title was announced.
  • Hyper-V v3.0
  • Hyper-V R3

The name of the server is Windows Server 2012.  The short for that is WS2012.

The name of the hypervisor is Windows Server 2012 Hyper-V.  The short for that is WS2012 Hyper-V.  There is also the free download, called Hyper-V Server 2012.

Hyper-V is available on Windows 8 Pro and Enterprise.  It’s official name is Windows 8 Client Hyper-V.

WS2012 Hyper-V – Supported Guest Operating Systems

This page is out of date. You can find more up to date post here.

The list of supported guest OSs from TechNet for WS2012 Hyper-V is listed below.  If this is like W2008 R2, the TechNet list will remain static while the actual supported list will be accurately reflected on TechNet Wiki.

Guest Operating System (Server) Notes
Windows Server 2012 Integration services do not require a separate installation because they are built-in.
Windows Server 2008 R2 with Service Pack 1 (SP 1) Datacenter, Enterprise, Standard and Web editions. Install the integration services after you set up the operating system in the virtual machine.
Windows Server 2008 R2 Datacenter, Enterprise, Standard and Web editions. Upgrade the integration services after you set up the operating system in the virtual machine.
Windows Server 2008 with Service Pack 2 (SP 2) Datacenter, Enterprise, Standard and Web editions (32-bit and 64-bit). Install the integration services after you set up the operating system in the virtual machine.
Windows Server 2008 Datacenter, Enterprise, Standard and Web editions (32-bit and 64-bit). Install the integration services after you set up the operating system in the virtual machine.
Windows Home Server 2011 Edition information is not applicable. Install the integration services after you set up the operating system in the virtual machine.
Windows Small Business Server 2011 Essentials and Standard editions. Install the integration services after you set up the operating system in the virtual machine.
Windows Server 2003 R2 with Service Pack 2 (SP2) Standard, Web, Enterprise, and Datacenter editions (32-bit and 64-bit). Install the integration services after you set up the operating system in the virtual machine.
Windows Server 2003 with Service Pack 2 Standard, Web, Enterprise, and Datacenter editions (32-bit and 64-bit). Install the integration services after you set up the operating system in the virtual machine.
CentOS 6.0 – 6.2 Download and install Linux Integration Services v3.3.
Red Hat Enterprise Linux 6.0 –6.2 Download and install Linux Integration Services v3.3.
SUSE Linux Enterprise Server 11 SP2 Integration services do not require a separate installation because they are built-in.

Note: The TechNet article indicates you should use Linux Integration Services v3.2 but they have been superseded by v3.3.

And for the client operating systems (VDI):

Guest Operating System (Client) Notes
Windows 8 Release Preview Integration services do not require a separate installation because they are built-in.
Windows 7 with Service Pack 1 (SP 1) Ultimate and Enterprise editions (32-bit and 64-bit). Upgrade the integration services after you set up the operating system in the virtual machine.
Windows 7 Ultimate and Enterprise editions (32-bit and 64-bit). Upgrade the integration services after you set up the operating system in the virtual machine.
Windows Vista with Service Pack 2 (SP2) Business, Enterprise, and Ultimate, including N and KN editions. Install the integration services after you set up the operating system in the virtual machine.
Windows XP with Service Pack 3 (SP3) Professional. Install the integration services after you set up the operating system in the virtual machine.
Windows XP x64 Edition with Service Pack 2 (SP 2) Professional. Install the integration services after you set up the operating system in the virtual machine.

Remember that even built-in integration services will have to be upgraded at a later time, e.g. for WS2012 Service Pack 1 if/when it comes out.

WS2012 Hyper-V – What You Can Install On The Management OS

The Performance Tuning Guidelines for Windows Server 2012 document is available and I’m reviewing and commenting on notable text in it.

The recommendation stays the same. A Hyper-V host is a Hyper-V host, and should not be a domain controller, file server, backup server, DNS server, database server, SBS, etc.  Don’t try to get clever with your language – you might think you can out-manoeuvre this but all you’re doing is being stupid and putting your employer/customer(s) at risk.

System administrators should consider carefully what software is installed in the root partition because some software can adversely affect the overall performance of the virtualization server.

The support folks word this more strongly, as they should. Would you really try to install Apache or MySQL on a VMware host (if you could)? And if you wanted to, then you shouldn’t be working in IT, in my opinion.

Windows Server 2012 (Hyper-V) Core Installation

The Performance Tuning Guidelines for Windows Server 2012 document is available and I’m reviewing and commenting on notable text in it.

On the subject of a Core installation of Windows Server 2012, the document says:

It features a smaller disk, memory profile, and attack surface. Therefore, we highly recommend that Hyper-V virtualization servers use the Server Core installation option. Using Server Core in the root partition leaves additional memory for the virtual machines to use (approximately 80 MB for the commit charge on a 64-bit edition of the Windows Server operating system).

You’ll save a couple of GB on disk space. When I’m able to buy disks smaller than 300 GB for my hosts I’ll care about this. Smaller disks are price listed, but my experience is that you’ll wait 3 months for them.

I don’t care about saving 80 MB of RAM on hosts with 48 GB, 192 GB, 256 GB, or 4 TB of RAM.

The other pro-Core argument is the number of security patches. I don’t care if I have 1 or 12 patches to install per month. I care about how many reboots I have to do; 1 patch = 1 reboot, 20 patches = 1 reboot. And on reboots, Cluster Aware Updating orchestrates that so I have no service downtime.

I care about easy administration. When there is a problem, I don’t want to be googling PowerShell. I sure as hell don’t want a junior operator/engineer to be searching the net for PowerShell alternatives to tasks that are quick/easy in the GUI. And until the h/w vendors have given us easy/complete non-GUI options for hardware management/troubleshooting, the Full installation is my recommendation, despite what Redmond says.

Microsoft’s recommendation remains unchanged from W2008 and W2008 R2. The Great Big Hyper-V Survey of 2011 shows only a very small percentage of you agreed to follow Microsoft’s advice on Core in the past.  One thing has changed in WS2012.

You can switch on the GUI in a Core via Server Manager, but it requires a reboot, and booting any new piece of server hardware takes 10 minutes these days (compare a WS2012 boot on a PC or laptop where it’s seconds).  That’s 10 minutes more for the customer or boss to be in your ear asking when their email will be back up and running.

In my opinion and experience, the cost of the full GUI is negligible and therefore I continue to recommend that type of installation.  I will consider changing my mind when I can flip from Core-GUI-Core without a reboot.

Performance Tuning Guidelines for Windows Server 2012

The Performance Tuning Guidelines for Windows Server 2012 document is available. I’ve previously read the performance doc for Windows Server 2008 and Windows Server 2008 R2, focusing on the Hyper-V piece. Let’s look at some notable sections for Hyper-V in the new 2012 version of the doc.  I had started writing a post with notes from this document but … well … the post was nearly as long as the document itself and that’s a bit pointless.  Read the document for yourself.  There are some very detailed notes on advanced configurations that you should be aware of, even if you might not use them.

I’ll post highlights over the coming days/weeks/months.

Why Windows Server 2012 Hyper-V VHDX 4K Alignment Is So Important

Back in 2009, ZDNet asked if we were ready for 4K sector drives.  That was because the storage industry is shifting from 512 byte sector drives to 4K sector drives.  And that is going to cause a problem for operating systems and virtualisation that are not ready for 4K sector disks.

To smooth the shift, the storage industry is giving us Advanced Format 512e disks that are physically 4096 byte (4K) sector aligned but emulate 512 byte disks in their firmware.  This wiki page describes how this emulation works.  Note that the read process should not cause performance issues (but might) but the emulated read-modify-write (RMW – 4K is read in, 512 bytes are modified in the 4K, disk is spun, and old 4K is overwritten) process could actually have a significant performance price (Microsoft say 30% to 80%).

4K Physical Sector is shown with 8 chunks of 512 each. Step 1: Read 4K Sector into Cache from Media. Arrow. Step 2: Update 512-byte Logical Sector in Cache (one of 512 blocks highlighted). Step 3: Overwrite previous 4 K Physical Sector on Media.

The following OS’s support 512e drives:

  • Windows 8
  • Windows Server 2012
  • Windows 7 w/ MS KB 982018
  • Windows 7 SP1
  • Windows Server 2008 R2 w/ MS KB 982018
  • Windows Server 2008 R2 SP1
  • Windows Vista w/ MS KB 2553708
  • Windows Server 2008 w/ MS KB 2553708

Eventually we’ll start to see native 4K disks with no emulation.  Microsoft says:

The current VHD driver assumes a physical sector size of 512 bytes and issues 512-byte I/Os, which makes it incompatible with these disks. As a result, the current VHD driver cannot open VHD files on physical 4 KB sector disks. Hyper-V makes it possible to store VHDs on 4 KB disks by implementing a software RMW algorithm in the VHD layer to convert the 512-byte access and update request to the VHD file to corresponding 4 KB accesses and updates.

RMW is bad, mmm-kay!  If you’re on 4K disks (either native or 512e) then you’re going to want 4K aligned virtualised storage to maintain performance.

Only Windows Server 2012 and Windows 8 support native 4K disks (with no 512 emulation) with no emulation.  They also offer us the 4K aligned VHDX file.  That means if you’re using 4K disks (native or 512e) and you want performance, then you should use VHDX files.

Note that vSphere 5.0 does not support 4K disks yet.

Is Windows Server 2012 RTM Closer Than We Think?

Oh you just know when RTM is nearby. Documents that don’t talk about beta or release candidate start to trickle out. Overnight I saw a Windows Server 2012/Windows 8 Branch Cache Deployment guide. And just now, Jose Barreto tweeted about a new version of the Performance Tuning Guidelines for Windows Server 2012 document. Can you smell it? The flavour of RTM is in the air, and it’s good!

BTW, MSFT did say first week of August, and that is next week.  But Mary Jo Foley did warn us to watch out for under-promise and over-deliver, i.e. an early RTM.  Let’s hope there are know showstopper bugs logged.

Rough Guide To Setting Up A Scale-Out File Server

You’ll find much more detailed posts on the topic of creating a continuously available, scalable, transparent failover application file server cluster by Tamer Sherif Mahmoud and Jose Bareto, both of Microsoft.  But I thought I’d do something rough to give you an oversight of what’s going on.

Networking

First, let’s deal with the host network configuration.  The below has 2 nodes in the SOFS cluster, and this could scale up to 8 nodes (think 8 SAN controllers!).  There are 4 NICs:

  • 2 for the LAN, to allow SMB 3.0 clients (Hyper-V or SQL Server) to access the SOFS shares.  Having 2 NICs enables multichannel over both NICs.  It is best that both NICs are teamed for quicker failover.
  • 2 cluster heartbeat NICs.  Having 2 give fault tolerance, and also enables SMB Multichannel for CSV redirected I/O.

image

Storage

A WS2012 cluster supports the following storage:

  • SAS
  • iSCSI
  • Fibre Channel
  • JBOD with SAS Expander/PCI RAID

If you had SAS, iSCSI or Fibre Channel SANs then I’d ask why you’re bothering to create a SOFS for production; you’d only be adding another layer and more management.  Just connect the Hyper-V hosts or SQL servers directly to the SAN using the appropriate HBAs.

However, you might be like me and want to learn this stuff or demo it, and all you have is iSCSI (either a software iSCSI like the WS2012 iSCSI target or a HP VSA like mine at work).  In that case, I have a pair of NICs in each my file server cluster nodes, connected to the iSCSI network, and using MPIO.

image

If you do deploy SOFS in the future, I’m guessing (because we don’t know yet because SOFS is so new) that’ll you’ll mostly likely do it with a CiB (cluster in a box) solution with everything pre-hard-wired in a chassis, using (probably) a wizard to create mirrored storage spaces from the JBOD and configure the cluster/SOFS role/shares.

Note that in my 2 server example, I create three LUNs in the SAN and zone them for the 2 nodes in the SOFS cluster:

  1. Witness disk for quorum (512 MB)
  2. Disk for CSV1
  3. Disk for CSV2

Some have tried to be clever, creating lots of little LUNs on iSCSI to try simulate JBOD and Storage Spaces.  This is not supported.

Create The Cluster

Prereqs:

  • Windows Server 2012 is installed on both nodes.  Both machines named and joined to the AD domain.
  • In Network Connections, rename the networks according to role (as in the diagrams).  This makes things easier to track and troubleshoot.
  • All IP addresses are assigned.
  • NIC1 and NIC2 are top of the NIC binding order.  Any iSCSI NICs are bottom of the binding order.
  • Format the disks, ensuring that you label them correctly as CSV1, CSV2, and Witness (matching the labels in your SAN if you are using one).

Create the cluster:

  1. Enable Failover Clustering in Server Manager
  2. Also add the File Server role service in Server Manager (under File And Storage Services – File Services)
  3. Validate the configuration using the wizard.  Repeat until you remove all issues that fail the test.  Try to resolve any warnings.
  4. Create the cluster using the wizard – do not add the disks at this stage.  Call the cluster something that refers to the cluster, not the SOFS. The cluster is not the SOFS; the cluster will host the SOFS role.
  5. Rename the cluster networks, using the NIC names (which should have already been renamed according to roles).
  6. Add the disk (in storage in FCM) for the witness disk.  Remember to edit the properties of the disk and rename if from the anonymous default name to Witness in FCM Storage.
  7. Reconfigure the cluster to use the Witness disk for quorum if you have an even number of nodes in the SOFS cluster.
  8. Add CSV1 to the cluster.  In FCM Storage, convert it into a CSV and rename it to CSV1.
  9. Repeat step 7 for CSV2.

Note: Hyper-V does not support SMB 3.0 loopback.  In other words, the Hyper-V hosts cannot be a file server for their own VMs.

Create the SOFS

  1. In FCM, add a new clustered role.  Choose File Server.
  2. Then choose File Server For Scale-Out Application Data; the other option in the traditional active/passive clustered file server.
  3. You will now create a Client Access Point or CAP.  It requires only a name.  This is the name of your “file server”.  Note that the SOFS uses the IPs of the cluster nodes for SMB 3.0 traffic rather than CAP virtual IP addresses.

That’s it.  You now have an SOFS.  A clone of the SOFS is created across all of the nodes in the cluster, mastered by the owner of the SOFS role in the cluster.  You just need some file shares to store VMs or SQL databases.

Create File Shares

Your file shares will be stored on CSVs, making them active/active across all nodes in the SOFS cluster.  We don’t have best practices yet, but I’m leaning towards 1 share per CSV.  But that might change if I have lots of clusters/servers storing VMs/databases on a single SOFS.  Each share will need permissions appropriate for their clients (the servers storing/using data on the SOFS).

Note: place any Hyper-V hosts into security groups.  For example, if I had a Hyper-V cluster storing VMs on the SOFS, I’d place all nodes in a single security group, e.g. HV-ClusterGroup1.  That’ll make share/folder permissions stuff easier/quicker to manage.

  1. Right-click on the SOFS role and click Add Shared Folder
  2. Choose SMB Share – Server Applications as the share profile
  3. Place the first share on CSV1
  4. Name the first share as CSV1
  5. Permit the appropriate servers/administrators to have full control if this share will be used for Hyper-V.  If you’re using it for storing SQL files, then give the SQL service account(s) full control.
  6. Complete the wizard, and repeat for CSV2.

You can view/manage the shares via Server Manager under File Server.  If my SOFS CAP was called Demo-SOFS1 then I could browse to \Demo-SOFSCSV1 and \Demo-SOFSCSV2 in Windows Explorer.  If my permissions are correct, then I can start storing VM files there instead of using a SAN, or I could store SQL database/log files there.

As I said, it’s a rough guide, but it’s enough to give you an oversight.  Have a read of the above linked posts to see much more detail.  Also check out my notes from the Continuously Available File Server – Under The Hood TechEd session to learn how a SOFS works.