Start a Conversation

Unsolved

This post is more than 5 years old

9879

December 13th, 2010 09:00

Restoring replicated Cluster Volumes to DR Hyper-V cluster

Hi,

We have two PS4000XV units. They are on seperate sites (live and DR site). Each one has a 4 node Hyper-V cluster attached to it.

The volumes are replicated one way to the DR site. In the event of failure we will attach to the latest snapshot of the replicated volume and bring the machines back online.

However, without a clean export to import from - does anyone have any advice as to the quickest way to get these Hyper-V VM's online?

1 Message

December 15th, 2010 12:00

"Hi,

We have two PS4000XV units. They are on seperate sites (live and DR site). Each one has a 4 node Hyper-V cluster attached to it.

The volumes are replicated one way to the DR site. In the event of failure we will attach to the latest snapshot of the replicated volume and bring the machines back online.

However, without a clean export to import from - does anyone have any advice as to the quickest way to get these Hyper-V VM's online?"
you can import the VM via command line ...

here is a batch file that will do it ... might have to change the path to get it to work with your enviro...
the first arg is the Guid of the VM (%1) or Config file and the second is the VM name or Folder name (%2) ...
you can use this to build your own just make sure the paths are correct and it will work.

Basically you need to add a symbolic link file in the "config store location" (for lack of better words .. ) on the hyperv host and point it to you vm's config xml on your CSV . Then set your permissions on the files so Hyperv and read the files... after you get it going in hyperv you can add everything to your recovery Cluster in your DR site via Failover Cluster Manager MMC. I'm sure if you put some thought in to it you can make a powershell script that will do most of this automatically so you can failover your site with in a few minutes.

@echo off

mklink "%systemdrive%\programdata\Microsoft\Windows\Hyper-V\Virtual Machines\%1.xml" "C:\ClusterStorage\Volume2\%2\Virtual Machines\%1.xml"


icacls "%systemdrive%\programdata\Microsoft\Windows\Hyper-V\Virtual Machines\%1.xml" /grant "NT VIRTUAL MACHINE\%1":(F) /L

icacls c:\ClusterStorage\Volume2\%2\ /T /grant "NT Virtual Machine\%1":(F)
rem done


Let me know if it works . or if I have a type-o in the script .

3 Posts

December 16th, 2010 01:00

Hi,

Thanks very much for that, I will give it a try this afternoon. The conclusion I had reached earlier, was to have a duplicate config for the machines in hyper-V at the other end, without the VHD's attached. At failover I was going to point the machines back at the disks, however the permissions were not there and being a manual process, it is susceptible to human error.

Your method makes more sense. I will let you know how I get on.

3 Posts

December 16th, 2010 04:00

Your syntax is spot on and it works perfectly. Once these commands are rolled up into a powershell script it'll work in seconds as you said.

Many thanks!

No Events found!

Top