Monday, March 26, 2012

Moving a Hyper-V cluster to a new AD Domain

I recently had to move a production Hyper-V cluster to a new AD domain, as part of a forest migration project I am busy with.  Microsoft has a KB Article on the procedure, but it only applies to Windows Server 2003 and below, and then only in a non-production environment.  So a migration is out, I had to find a way to move all the nodes into a new cluster, with minimal disruption to the VM’s uptime.  This process assumes the new cluster will run on your existing hardware.  Here is what I did:

  1. Make a list of your VM’s per Cluster Shared Volume (CSV).  We won’t be able to share our CSV’s across clusters so our move process will be CSV driven
  2. Make a note of all the folder names under the c:\ClusterStorage namespace and how they map to your CSV’s
  3. Evict one of your nodes from the existing cluster
  4. Remove the Failover clustering role from the evicted node and join it to the new domain.
  5. Add the Failover Cluster role back once the node is added to the new domain
  6. Create a new cluster on the node in the new domain
  7. Shut down all the VM’s on the CSV that will be moved to the new cluster
  8. Delete the VM from Failover Cluster Manager (FCM).  Do *NOT* delete the VM from Hyper-V Manager
  9. Take the CSV offline and remove it
  10. Take the storage volume hosting the CSV offline and delete the disk from FCM
  11. Ensure that the LUN is not presented to nodes in the old cluster anymore
  12. Present the LUN to the host in the new cluster
  13. Open up Computer Management on a node in the new cluster, go to Storage and re-scan for new storage
  14. Bring the new disk online, taking care to not initialise it
  15. In FCM, go to Storage – Add Disk – Select the disk you brought on previously
  16. Go to Cluster Shared Volumes – Add Storage – select the storage added previously
  17. Rename the new folder under the c:\ClusterStorage namespace back to what it was previously called
  18. Open Hyper-V Manager, the VM status should change from Critical to Normal
  19. Make the VM’s highly available using FCM
  20. Start the VM’s
  21. Rinse and repeat for your other CSV’s

You should also evict nodes and join them to the new cluster as soon as your usage requirements allows you to do so.

6 comments:

  1. Thank you for the list. I've lab the setup and found the steps very helpful. My issue involves step (18) - no VMs appear on Host Server. I noticed the VMs failed over to the remaining node prior to deleting the VM from FCM. Thank you again for the resource.

    ReplyDelete
  2. Thanks for the feedback! That is peculiar. If your VM is running on eg vmhost_01 and you delete the VM from FCM, it should definitely still show up on vmhost_01, with a status as normal (will change to critical once you remove the CSV). Unless the VM was running on the node you evicted in step 3 - then the failover is to be expected, because the VM is still a highly available cluster resource.

    ReplyDelete
  3. I ran the lab twice now correcting my errors. You are correct; my lab is a two node cluster. I corrected the VM issue through adding the VM resource in FCM. VMs came up without issue. I have five Virtual Hosts with 173 VMs migrating to new Forest/Domain. Again, your steps were spot on. Thank you

    ReplyDelete
  4. Awesome, happy to have helped - All the best with your upcoming migrations!

    ReplyDelete
  5. Hi,

    There is little info out there on this kind of process, so this walk through helped me a lot in migrating a 2008r2 cluster from domain A to Domain B and upgrading the clients to 2012 in the process, before re-creating and adding members back to the new domain and cluster.

    thanks a lot.

    Jason B

    ReplyDelete
  6. Thanks for the feedback Jason - happy to have helped!

    ReplyDelete