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.