Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I had a PC with two physical disks:

  • C: containing the host operating system
  • D: containing a folder D:\VMs where all my virtual machines were stored

Now, the C: disk died. I bought a new one, reinstalled Windows on it, enabled Hyper-V feature and now I just need to open the VMs from the D:\VMs folder. However, I don't seem to be able to find a menu item or anything that would allow me to do that - the only thing I see is the "import" command which unfortunately requires the VMs to be explicitly exported (my machines weren't).

I would think that when I have all the files constituting a VM (the VHD file, some XML files describing the settings etc.) it should be somehow possible to just "open" these existing VMs in Hyper-V, right? What command am I missing?

Edit: I know I can create a blank virtual machines and then just point them to use existing VHDs. However, I am not sure about all the different settings I've made to those VMs so I hope there's a way to simply open those existing VMs instead of recreating them.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

this is possible, but it's not supported by microsoft.

basically, you have to create a new VM, copy the settings to the XML files, and rename the snapshots.

complete directions are here: http://eniackb.blogspot.com/2009/05/how-to-recover-hyper-v-virtual-machine.html

share|improve this answer

You will want to create a new VM in the Hyper-V console, and when you get to the part about creating a new .vhd, or selecting one, simply browse to the existing .vhd files you have.

  1. New > Virtual Machine
  2. Name it, and select the directory the VM is in that you want to bring up
  3. Select memory and network
  4. "Use and existing virtual hard disk" and select your .vhd

This method will bring them up exactly as they were when the server died, just reapply the same network, cpu and memory settings. Any machines that had snapshots will only be able to load them if you do an actual export/import, otherwise you are loading the base .vhd

share|improve this answer
    
So there is no way to "open" existing VMs without explicitly exporting / importing them? You just mentioned a couple of things that might cause trouble if I were to recreate all machines again (losing snapshots, VM settings etc.) –  Borek Jun 29 '12 at 14:37
    
You can mount them as a volume, but that's about it. The only way, that i'm aware of to get them running w/o the ability to export from the old box, is the method I described. –  DanBig Jun 29 '12 at 14:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.