Video Screencast Help

BE 2012: How to restore a VHD file?

Created: 27 Aug 2014 • Updated: 29 Aug 2014 | 12 comments
MIXIT's picture
This issue has been solved. See solution.

I'm in the unfortunate situation of possibly having to restore a VM ina  Hyper-V host.  The VM is currently BSOD'ing and troubleshooting hjas been a problem, so one option I am considering is just restoring the VHD file.  However I do not want to overwrite the VM (VHD + vm info) so I want to restore the VHD file to a seperate location, then tell Hyper-V Manager to point to that VHD file just so I can boot it and see if it works.  If so I would then shut the virtual machine down, move the newly restored VHD file over to the proper locationi where I store VHD's on this server, and reconfig Hyper-V Manager to now point to that , renaming and moving the old (BSOD'ing) VHD file elsewhere for a bit. 

I assume this is straightforward, yet when I click on my backup job (there is just one, and it covers the entire machine, VM's included) and hit the Restore button to start the wizard for that, and then the files & folders selection options, I don't see what I think I should.  As I browse the Resources View and drill down into the directory structure where the file should be, I don't see it.  I see only folderse at all levels, never a file on the right-side pane.  Am I missing something?  Is there some kind of limited view?  Do restores that relate to even just the raw VHD file itself somehow get masked or something so I can't simply restore just the file and have to do the whole VM or something? 

Thanks for your help. 

Operating Systems:

Comments 12 CommentsJump to latest comment

pkh's picture

VHD is automatically excluded from normal backups.

To do what you want, you need to restore the entire VM. You can restore the VM to another name

VJware's picture

If the backup was made to disk or if it is duplicated from tape to disk, an IMG directory on the disk storage containing the .vhd file will be present.

You can try importing this .vhd, however consistency is not guaranteed. Preferred restore method is as suggested above.

MIXIT's picture

No disk-based backups unfortunately, just your everyday LTO tape drive :(

MIXIT's picture

Thanks guys.  Very odd to me that .vhd files aren't simply restorable but I'm glad to know the method preferred.  In BE if I highlight the backup job I think in the servers view or something, I hit the Search button at the top.  I put in the filename, and it finds 407 instances of the file but only in the BE temp folder, under a subfolder called Deltas I think it was.  I didn't do anything with those since instead of x:\TEMP, the actual vhd is found within x:\Hyper-V\VMs or what not. 

Anyway, ok so I will look at the full VM restore.  Since this is an AD server and there are two AD servers in this domain, does restoring one AD server to itself 2 days old cause problems?  Nothing new was done so I'm not worried about data/users, etc being lost, but will the server restore and not cause problems with AD overall? 

Thank you guys. 

MIXIT's picture

Hi again!  REspectfully, I had to clear the Mark as Solution status on pkh's post. 

I found that it seems I can indeed restore just the VHD file.  But I need your advice before trying it.  Here's what I've done:

  1. Backup and Restore tab
  2. Servers view where it shows 5 servers (one is the Hyper-V host, 4 are the VM guests)
  3. Highlight the physical host server, click Restore button at top
  4. Wizard pops up, I am presented with four options.  The last option is Microsoft Hyper-V data
  5. Selecting this I am then given a dialog asking: which virtual machine or virtiual disks do you want to restore? - the default is the Resrouces view and let's me drill downt the hierarchy all the way to where the vhd file itself is located.  I see it, and can put a checkmark in it. 
  6. When I click Next, I am given the choice of restoring to original location, or to a different location.  I now pick different location. 

Here's where I get confused.  Attached to this post is a screenshot of the scrreen I am at.  I am not sure what to fill in for the Server Name, Drive (which oddly has no Browse button), and Server Path. 

My goal is just to point the file and restore it to a folder on the server someplace, not to rename it, nor register it with Hyper-V.  I'd rather just swap the vhd file manually so I can test between the problem VHD file and the resetored one.  There is no Help button on this wizard screen oddly.  Also I removed the checkmark from the Register the virtual machine. 

It keeps mentioning virtual machien but I think this is just inaccurate text labels on the screen, as all I've done in this restore process is pick the actual VHD file, not the full VM with environment files. 

Here's the screenshot:


LegAEI's picture

If you select register virtual machine, the process will error out. Just choose a directory to restore your file to and it will restore there.

MIXIT's picture

Process completed, file restored.  Curious but why would the Register virtual machine feature  error out?  Is that something Symantec needs to fix? 

LegAEI's picture

The VHD file is just a file, there isn't any metadata to register with the server. If you wanted to mount the VHD you would go through disk management in the operating system.

If you used the agent for hyper-v to do the backup, then you would have all the metadata, and thus could register the VM with the hyper-v host.

MIXIT's picture

Understood.  Yeah I do have the agent licensed.  Biut in this case it appears the old VHD file itself was somehow partially corrupt.  I need to make a new post on this actually so somebody can get their Mark as Solution bonus. 

maurijo's picture

In any case I think you did make a mistake the first time you tryed it. Are you sure that you selected the hyper-v host machine and then clicked restore ? I think you selected the hyper-v guest you wanted to restore and then clicked restore so that would be why it was not showing Hyper-v data first time.

It's like wanting to do a single item restore on a vmware machine but you select the vcenter or esx instead. Doing this it will not show you single files but only entire VMs.

Correct me if I am wrong, I don't have any experience restoring Hyper-v.

MIXIT's picture

No problem.  I know on my first try whatever I did was definitely wrong, but in my post with the screenshot, that's the process to get the VHD file restored.  Confirmed it as well by actually doing it successfully. 

maurijo's picture

Good that you got it working. Please mark a solution so that other people who have this problem can see the solution easier.