Go Premium for a chance to win a PS4. Enter to Win


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

Posted on 2013-11-20
Medium Priority
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 38

Accepted Solution

Mahesh earned 2000 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 38

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 38

Expert Comment

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


Featured Post

Cyber Threats to Small Businesses (Part 1)

This past May, Webroot surveyed more than 600 IT decision-makers at medium-sized companies to see how these small businesses perceived new threats facing their organizations.  Read what Webroot CISO, Gary Hayslip, has to say about the survey in part 1 of this 2-part blog series.

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

824 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