Sam Winstanley’s Blog

Market Research Technology News and Views

Sam Winstanley’s Blog header image 2

Moving Hyper-V Virtual Machines between physical disks..

October 3rd, 2008 · 7 Comments

Generally spring is the time for cleaning, but for me it came early this year because one of my hard disks failed after only 4 months of service. It also happened to be the hard disk that contained all of my VM’s, quite annoying but I had backups. All of this lead to a rethink and a decision to replace my broken hard disk with 2 mirrorred hard disks. As these were both new, I decided to use 2 different brands of the disks in case some kind of factory problem was going to cause these to fail on the same day.

Installing the new disks into my trusty HP server was easy, it can hold 4 disks and it has support for Hardware RAID. I have a spare slot still and I will put the RMA’d failed disk into that when it arrives and use it as a backup device.

The net result of all this thinking was that some thinking and re-arranging of stuff was going to leave me with new drive letters for my Hyper-V area, as a result some configuration changes are needed to pull this off. On the net I’ve seen several somewhat hacky ways to do this but I wanted to do it what I think is “the right way”.

This is the approach I took:

  1. Export each of the VM’s to the new disk using the Hyper-V manager’s built in Export feature which I would say 2 things about:
       – is rather slow to be polite. I am certain it would be faster if I paid an exhorbitant amount of money for expensive disks but still this is SATA-300 to SATA-300 on the same machine and exporting 120GB took somewhere over an hour.
       – in general there should be an optimized way to just “move a VM” along with all its stuff. Exporting is more made for moving between machines.
  2. Delete the VMs in the Hyper-V manager (gulp)… gotta hope that export was successful.
  3. Change the Overall hyper-v settings to point at the new mirrored drive/paths.
  4. Import each of the virtual machines. This is very much faster than exporting thankfully.
This all seems pretty obvious, there’s likely a better way, the trouble is that Hyper-V is doing so many clever things with differencing disks and stuff all the time that just copying the VHD hard disk file is never going to work.
All of this wasn’t admin for the sake of Admin.. These problems have lead me to re-think the way I back up. Previously my main network server with lots of important stuff on it (which happens to be Windows 2003) was always backed up from the “inside”, e.g. it was running backup jobs on itself like it was a normal machine. This meant that when I had to restore it was really like doing a BMR (bare metal restore) and that took an age to do, I did have backups of the VM configurations and disks from an earlier point but they were out of date with my daily inside backups which left me in no-mans land a bit.
Usually I use Acronis to back up, but I’ve actually been having some problems because of patchy windows 2008 support meaning the Hyper-V area doesn’t back up properly (some kinds of VSS problems). My new thought is that I’ll use the build in Windows Backup system to backup the entire system to a hard disk, while still using acronis to back up critical files to an off-site location.
In essence, I’m feeling that when using Hyper-V “outside” backups of the VHD and associated files are going to lead to much faster recovery, but.. at the same time, outside backups are pretty lousy for restoring individual files/data inside the virtual machines, so I will have inside backups for those tasks. 
My feeling is that somebody should capitalize on this, its probably not a lot of work, most backup catalogs can be browsed by the tool that makes them, if that browsing and restore ability was extended to include the inside of VHD files (while managing the associated snapshots) we’d be in much better shape for a unified backup solution..
/Sam

Tags: Hyper-v · Off Topic · Tech

7 responses so far ↓

  • 1 Mike // Mar 12, 2010 at 6:25 pm

    Good info! Thanks for the post. I’m interested if there’s anyone else who’s done it the manual way (getting past the “differencing” stuff and whatnot.)

    Thanks Again. –Mike (Virginia)

  • 2 Mike // Mar 13, 2010 at 12:11 am

    Okay…I’m lucky enough to have SCVMM…so I tried Migrate…but it kept failing after shutting down SCVMM! So I use the Export method written about here (on the local machine running Hyper-V) and it worked great. Just had to identify the machine from the SCVMM system after getting it moved. Thanks again! –Mike

  • 3 Lester Clayton // Nov 12, 2010 at 4:20 am

    I know this thread is old, but it’s also one of the first ones which pop up on google search. The best way I’ve found to move the VM from one storage to another is to use VMM – right click the VM in question, select “Migrate Storage” and then select the target Storage. To migrate to another host, use “Migrate” and then select the target host.

  • 4 hyper-v // Oct 13, 2011 at 12:27 pm

    i found this solution after long search this thread old but solution still running thanks you solve my problem.

  • 5 Rob Lewis // Nov 28, 2011 at 6:26 pm

    I also just stumbled across this.
    My SCVMM (2008 R2) doesn’t have a Migrate Storage option, just Migrate. Tried to migrate to the same host, different storage location. It appeared to work, but froze on 56%…

  • 6 http://purecollagenfacts.com // Jun 24, 2013 at 2:17 am

    Hello, Neat post. There is an issue with your site in web explorer, might check this?
    IE still is the market chief and a good portion of other people will miss your great writing because of this problem.

  • 7 Clearpores complaints // Jul 2, 2013 at 10:57 am

    vrnlstvswfzyusfnf/dpn, Clearpores vs proactiv, oLAAppJ, [url=http://clearporesi.com/]Clearpores system review[/url], KjZRHSk, http://clearporesi.com/ ClearPores, iuwAgad.

Leave a Comment