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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

821 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