I have a Virtual Machine ADS00
running a guest OS WS 2012 R2 .It’s vhdx file is located on a Failover Cluster node physical server running Hyper-V Core 2012 R2. As the services offered and requirements for this VM continued to scale, we decided to migrate it to the Cluster volume and make it highly available in the Failover Cluster. The steps to achieving this objective are outlined as follows:
1) Login to the VMHost Host00 and verify that the guest VM CMS00 is running normally:
2) Determine the current storage path of the guest VM CMS00:
PS C:\> Get-VMHardDiskDrive -ComputerName host00 -VMName cms00 | fl
3) Use the Move-VMStorage cmdlet to relocate the guest VM’s storage to the predetermined cluster storage volume.
The -Vhds parameter accepts a hashtable of the sourcefilepath with it’s corresponding value and the destinationfilepath with it’s value. Use the Get-VMHardDiskDrive
cmdlet to verify the new path . From the above screen shot, we can confirm that the new storage path has changed to the cluster volume after the move operation.
4) After the move, use the Add-ClusterVirtualMachineRole
cmdlet to add the VM ADS00 as a Cluster role and complete the process of making it highly available .
5) Additionally, I enabled Hyper-v replication on the new Cluster role (ADS00 virtual machine) using Failover Cluster Manager to a Replica Server running WS 2012 R2. I had initially setup a Hyper-V broker for the Cluster to facilitate this process.