Clone virtual machine with Server 2008 R2 and Hyper-V?

2

I've recently just started working with Hyper-V, and so far it's quite nice. However, I've been running into problems with what seems like it should be the most basic of workflows. I've set up a baseline Server 2008 R2 configuration, and exported it with the intention of using the export for cloning. I entered "C:\Exports\" as the export folder.

However, I run into problems when I try to import the image. From the Hyper-V manager, I select "Import Virtual Machine" and in the resulting window I entered "C:\Exports\BuildServer\" as the folder, set the radial to "Copy the virtual machine (create a new unique ID)" and checked the checkbox for "Duplicate all files so the same virtual machine can be imported again." Doing so results in the following error:

"Import failed. Import task failed to copy file from 'H:\Exports\BuildServer\Virtual Hard Disks\BuildServer.vhd' to 'C:\Hyper-V\Virtual Hard Disks\BuildServer.vhd': The file exists. (0x80070050)"

Have I somehow messed something up in configuration? Or is this a known thing? I've read it should be possible to clone VMs by copying them in the filesystem but I'd prefer to keep things in the management Ui if possible.

hyper-v
hyper-v-server-2008-r2
clone
import
asked on Server Fault Apr 27, 2010 by bwerks

1 Answer

3

I can't answer your question directly, but perhaps help a bit anyways. First of all, I was going to do some exporting and importing when rebuilding out two Hyper-V servers as a cluster when R2 came around with Live Migration support. I tried exporting and importing, but could not get it right. I found no simple answers to why either, so I simply ended up creating new VMs and attaching the VHDs on them. That worked fine, just make sure you don't have any snapshots.

That said, if you are going to be seriously using Hyper-V I recommend you go with SCVMM. SCVMM lets you manage, template and provision VMs in a very nice UI. I think the pricing is reasonable for what it offers. It also lets you clone VMs easily.

(WARNING: I got lunch and a donut from MS yesterday and I may still be biased. Donuts do that to me.)

answered on Server Fault Apr 27, 2010 by Gomibushi • edited Apr 27, 2010 by Gomibushi

User contributions licensed under CC BY-SA 3.0