Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 37

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 37

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 37

Expert Comment

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


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
Suggested Courses

721 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