Wednesday, 20 June 2012

Upgrade Windows Server 2008 R2 Hyper-V cluster to Windows Server 2012

With the RC version of Windows Server 2012 now available it is time to start preparing for the final version. Since the company I work for has implemented numerous Windows Server 2008 R2 Hyper-V cluster installations, one of the first tasks upon release will be to start upgrading them to 2012 version. I decided to skip extensive preparations and just start an in-place upgrade of our lab environment and see where it goes.

I've tried to do an in-place upgrade of one of the Windows Server 2008 R2 Enterprise Hyper-V cluster nodes, but I got an error message saying that I need to evict the node first and then do the upgrade. So I did just that. I've evicted the node and in-place upgrade went pretty smooth and I even did the whole process through Remote Desktop session. It took 30-45 minutes.

When the Windows Server 2012 booted up, I could not find my Failover Cluster Management Console. I needed to go to the Server Manager > Local Server > Manage > Remove Roles and Features and I removed and readded the Failover Clustering feature. The Failover Cluster Manager console was now available in Server Manager > Local Server > Tools combo box.






I've started up the Failover Cluster Manager console and I tried to connect to existing Windows 2008 R2 cluster, but I got the following message:



So my hopes that I could maybe join the Windows Server 2012 cluster node to the existing 2008 R2 cluster and just Live Migrate the virtual machines to the new node were gone. That's something that's available in VMware for some time now.

So, I had to build the entirely new cluster and import virtual machines into it. Creating Failover Cluster process is pretty much the same as the previous version. I've created a single node cluster, provisioned the 800 GB iSCSI LUN that will be my CSV disk and imported it under the Storage > Disk node in Failover Cluster Manager console and created a CSV from it.




Once I got my Windows 2012 Hyper-V cluster operational it was time to move virtual machines from old Windows Server 2008 R2 cluster to the new 2012 node. I just simply copied the VM from old CSV disk to the new CSV disk through Windows Explorer without first exporting the machine or any special preparations. Once I did that I started up Hyper-V Manager console on Windows 2012 and used the Import Virtual Machine wizard. I followed through the wizard and that was it! My VM was now imported and running on Windows Server 2012 Hyper-V.








Note: You will have to reconnect the VM network adapter of the importing machine to a valid Virtual Switch on your new 2012 Hyper-V server.




After I did that for all my VMs, now I had to make them clustered. I opened Failover Cluster Manager console, right click Roles and click Configure Role...


Choose Virtual Machine role....



Select the virtual machines that you want to make Highly Available...


And the virtual machines are now clustered.




This is excellent progress from the previous versions and pains of exporting and importing machines and using scripts to migrate clustered VMs.

Considering this procedure my guess is that I could just dismount the existing CSV LUN from the old cluster node and mount it to the new cluster node. Using Hyper-V Manager console I could simply just import the virtual machines one by one and then make them cluster aware. There is no provisioning of new LUNs, copying large amounts of data and long periods of downtime to move to the Windows Server 2012 Hyper-V cluster. So far so good from Microsoft.

Now I will dig up into SCVMM 2012 SP1 which is requirement if you want to manage Windows Server 2012 Hyper-V. SP1 has just recently been progressed to CTP2 (link). Maybe it will make the cluster migration process even easier.

17 comments:

  1. So your VM's didn't have missing NIC's or any of the jazz like you would in 2008 R2 by skipping the export step?

    ReplyDelete
    Replies
    1. That's correct, no NICs missing and all network settings are kept when you boot your migrated VM.

      Delete
  2. I have a question about your CSV setup. You created a single 800GB CSV and have multiple, independent VMs use that single CSV? What are the advantages of this vs. one CSV per VM

    I currently have about 30 VMs on 3 hosts with each VM having a single CSV. With your configuration can I have the VMs split on to multiple hosts while all the data is on a single CSV?

    ReplyDelete
    Replies
    1. The purpose of CSV (Clustered Shared Volumes) is to allow multiple VMs to share a single LUN while VMs don't have to run on the same Hyper-V host. CSVs enable multiple Hyper-V hosts to simultaneously read and write on one physical LUN.

      In your configuration, I suggest you create one, or several CSVs and place the VMs on those CSVs. By using single CSV per VM you are defeating the purpose of CSV.

      Advantages are numerous, managing single LUN instead of multiple, storage space savings, simpler backup routines, no GUID mounted volumes, etc.

      Delete
  3. Dinko,
    Thank you for your quick reply. I will be upgrading my cluster to 2012 next month and after reading the Hyper-V improvments I am very excited with the new options/enhancments. I think I will be moving to CSVs based on functional groups (mail servers, specific production apps, test enviroment), and I will try to keep those groups together, but as you stated, that will not be required.

    Thank you for taking the time to test this as an early adopter and your willingness to share!

    Dan

    ReplyDelete
  4. So you can't joint a 2008R2 cluster? That is horrible! What if all of your disks on your SAN are already provisioned for a 2008R2 cluster?

    ReplyDelete
  5. Exactly that's my point too. My SAN is exclusively for the Hyper-V cluster; I don't have any free space to create an additional disk.

    ReplyDelete
  6. If anyone from MS is reading this, we need a solution for this. Not all of your customers work for multi-million dollar corporations with multiple SANs. We need to be able to join a 2008R2 cluster, then once all of the 2008R2 hosts are retired, enable native mode. You have done this with Exchange and with AD, why not with Hyper-V?

    ReplyDelete
  7. Guys, it actually is possibble to reuse the same storage on the new cluster. You can offline and unmap the CSV LUN from the old cluster and remap it to the new cluster. Follow this link for the procedure: http://blogs.msdn.com/b/clustering/archive/2012/06/25/10323434.aspx

    ReplyDelete
  8. But that requires downtime. We use our Hyper-V cluster in production. We are a 24/7 shop. :(

    ReplyDelete
    Replies
    1. and you also expect to install an entire OS with Zero downtime as well ?

      Delete
    2. Of course it is legitimate to expect a zero downtime when having numerous hypervisors: that's what high availability stays for. Each single hypervisor will of course experience downtime but the VMs have to be "live-migratable". I am bitterly disappointed 2012 cannot join 2008R2 cluster!!!

      Delete
    3. The cluster constraints are no different than from 2003 to 2008/R2. It's just more noticeable to you now since virtualization has come in to the picture.

      It's a big upgrade. We're not talking about OS updates, which a cluster can account for perfectly. You're talking about a complete OS installation of a new generation. That's not what a cluster was designed to compensate for, let alone virtual resource up-time. This is a big project that will require planning and downtime to accomplish.

      Delete
  9. Hey, I have 4 Node Cluster and Hyper-V Server 2008 R2 Sp1 is installed in all the host. I have to upgrade my cluster to Hyper-V Server 2012. I was reading some forums and its was saying that "the storage that is common to both clusters (LUNS) should be presented to the new cluster." I understood from this is that the Luns which are assigned to existing 2008 R2 cluster will be accessible?

    Refer the article- http://blogs.msdn.com/b/clustering/archive/2012/06/25/10323434.aspx

    ReplyDelete
    Replies
    1. Actually, no. You should unpresent the storage from the old cluster and present it to the new cluster and then import the virtual machines.
      The link you posted also states the following:
      "Note: Data could become corrupt if they are presented to multiple clusters at the same time. "

      Delete
  10. I have the same scenario to complete next week.
    You mention you broke a 2-node cluster, and then upgraded a single node and created a single node cluster.
    Did you then go on to upgrade the other node and re-create the 2-node cluster? If so did you encounter any issues?

    Cheers
    Andrew

    ReplyDelete
    Replies
    1. Andrew

      Did you do your migration? I am also a 2 node cluster and I have 1 SAN. I will probably add a third server in the mix and make that my 2012 but I am wondering how that is going to work with the cluster storage. If I make a 2012 single node cluster can it share the same luns on the SAN? I see that there is a cluster migration from 2008 to 2012, that is hopeful. Its just the storage that scares me.

      Roy

      Delete