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've got a Hyper-V machine that I want to copy so that I can keep a template around for other servers.

I tried using the export/import feature but regardless of which folder I use, it always errors with the following:

Import failed. Unable to find virtual machine import files under location

How do you copy machines?

share|improve this question

3 Answers 3

We use SCVMM to store template VHDs... this is probably the easist way. If you don't want to buy VMM, you can probably get away with doing a sysprep of the machine before you copy the VHD. This ensures that the image is properly prepared for duplication.

We've never had much luck with the export/import feature, either. If you end up just copying the VHD, you'll need to make note of the VM configuration as this will need to be regreated manually.

share|improve this answer
  1. Sysprep the guest VM (if you are trying to use this machine as a template)
  2. Shut down the guest
  3. Rename the VM to “my base VM” in Hyper-V Manager (again presuming this is a template if not this is not needed)
  4. Hyper-V Export Virtual Machine
  5. Rename the original VM back to the original name
  6. Make a copy of the exported directory (again if this is a template otherwise skip)
  7. Import the one of the directories
  8. Rename the new VM to your new VM name, (eg "my cloned VM")

For a scripted example see Hyper-V WMI – Cloning Virtual Machines Using Import/Export

share|improve this answer

Easiest way is to just search for your VHD.

Just do a find *.vhd, thats basically everything right there, copy it somewhere and now you've got a reference image.

You should also look at why the import/export fails, that might be indicative of a configuration issue.

share|improve this answer
    
This is about 90% of it, but there is more to a hyper-V image than just a hard drive. Certain hardware choices and other settings might be important as well. –  Joel Coel Mar 3 '11 at 20:25
    
If you can pick the same settings when resetting up your VM it'll run fine. And to be honest if its a windows VM it'll probably run fine anyways. Only time I run into a problem is when I'm hitting linux VMs and forget to add a legacy NIC. –  ErnieTheGeek Mar 3 '11 at 20:46
1  
Import/export really is important and should work. –  Jim B Mar 3 '11 at 21:01
    
Yeah, I'd probably reload the Host OS if I had that kind of problem. –  ErnieTheGeek Mar 3 '11 at 21:07

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.