Solved

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

Posted on 2013-11-20
5
870 Views
Last Modified: 2014-11-12
Hi,

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?

Thanks,
Dave
0
Comment
Question by:ITLighthouse
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
Mahesh earned 500 total points
ID: 39664122
You can follow below step by step guide to migrate your machines to Hyper-V cluster
http://blogs.technet.com/b/askcore/archive/2011/05/26/how-to-export-non-clustered-vm-s-and-import-them-to-csv-shares-on-2008-r2-cluster.aspx

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
http://blogs.msdn.com/b/clustering/archive/2009/02/19/9433146.aspx

Hope that helps
Thanks
Mahesh
0
 
LVL 1

Author Comment

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

Author Comment

by:ITLighthouse
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.

Thanks!
0
 
LVL 35

Expert Comment

by:Mahesh
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
http://blogs.technet.com/b/meamcs/archive/2012/03/14/solved-how-to-move-a-hyper-v-virtual-machine-without-exporting-it-first.aspx
http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/03/10/understanding-where-your-virtual-machine-files-are-hyper-v.aspx

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

Thanks
0
 
LVL 35

Expert Comment

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

Thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now