Migrating 2008 R2 Hyper-V virtual machines to 2008 R2 Hyper-v cluster

Posted on 2013-11-20
Last Modified: 2014-11-12

I currently have a single 2008 R2 hyper-v server running several VMs.  The VMs are already stored on iSCSI SAN on a volume that will become a cluster shared volume.  I have another identical server and want to set up a cluster.  My question has to do with importing the VMs into the cluster.  I would prefer not to have to export the VMs first, because the virtual disks are already on the shared storage and in the location I want them.  It is my understanding that exporting a VM will capture the VHD in the exported file.  This will take much longer than it needs to, because the files are already where they need to be.  Is there any way to export just the VM settings without the disks, and then attach the the disks later?  Or would I be better off just creating new VMs in the cluster and pointing them to the existing VHDs after I stop the original VMs?  

Unfortunately, I need to migrate all the VMs during the same downtime window because the current hyper-v server will become a cluster node, and the current volume holding the VMs will become a cluster shared volume.  I could be wrong, but I don't believe I can have clustered VMs and non-clustered VMs running on the same volume.  

Can someone let me know the best way of doing this?

Question by:ITLighthouse
  • 3
  • 2
LVL 36

Accepted Solution

Mahesh earned 500 total points
ID: 39664122
You can follow below step by step guide to migrate your machines to Hyper-V cluster

Above guide is based on export \ import of virtual machine configuration files only with some automated (Scripted) way because converting server volumes containing VHD files into CSV won't delete the VHD files.
However guide suggest you to manually export all vms prior to start the migration so that you can have backup in case.

In one stage in guide after creating CSV, you need to delete VM from hyper-V host and import VM configuration through script which will import VM and map its VHD file from CSV volume.
At this step I suggest you not to delete VM from hyper-v console and just edit its HDD path and point it to CSV path.Test it 1st as precautionary measure.Benifit is, you don't required to run VM import script.
Then you can make VM highly available.

Windows 2008 R2 CSV feature functions as a distributed-access file system optimized for Hyper-V.In the past, only one node could host a virtual machine (VM) and access the VHD on the shared storage, so if another node needed to host the VM or access the disk, it would need to failover and it would affect every resource on that shared disk.  With CSV in R2, any node can host the VM and any node can access the VHD on shared storage, so VM and disk ownership can move freely across cluster nodes without impacting any other resources on that shared disk.
Thats why you can have clustered VMs and non-clustered VMs running on the same volume

Hope that helps

Author Comment

ID: 39664326
Wow, thanks for all the information.  I will review and see if I have further questions.

Author Comment

ID: 39664433
So here are the steps I need to follow for my environment as I understand them:

1) Stop all the VMs
2) make sure you have a backup of the VMs, either by export or other backup method
3) create cluster
4) create CSV (previous drive letter to volume will automatically be removed)
5) Open hyper-v manager and modify VHD path for each VM to C:\ClusterStorage\...
6) Open Failover Cluster Manager and add the VMs

Is that pretty much the basic procedure?  Thanks for the tip about not needing the import script.  The script seems complicated and unecessary if all it really does is change the path of the VHD.  

Please let me know if I'm missing something.

LVL 36

Expert Comment

ID: 39665031
In the guide provided there is script to import VM, but you need to delete VM before that
I just tried to avoid VM deletion

On IMP point:
You must export all VMs Configuration file with script provided in guide prior to build cluster.
if you are not deleting VM as per guide, then you might need to find VM configuration file, as whole VM path will be moved to CSV once you created CSV volume.
Please test below 1st as i haven't tested
On step no 5, you might get an error that VM configuration path is not found. Then you might need to locate VM configuration path as well.

Check your default "Virtual Machine settings" under "hyper-V settings"

Please check below articles, they will help you

If above trick fails then you must delete VM on step 5 as suggested by guide and then import same from provided script...
You can create new VMs and point them to clusterstorage for VHD.....

LVL 36

Expert Comment

ID: 39665225
I have added one point in my earlier post


Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question