We help IT Professionals succeed at work.

HYPER-V configuration only export /import

Eric
Eric used Ask the Experts™
on
Hi,

I am trying to find a power shell script for configuration export / import only that works without any intervention.

There has been a very good vb script but that script needs to be modified before import.

here is the script

http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/03/24/performing-a-configuration-only-export-import-on-hyper-v.aspx.

But this script has one problem that needs to be fixed before as describe in the following link

http://mtirado.wordpress.com/2011/01/27/hyper-v-virtual-machine-import-error/

Basically, Boolen value needs to be change to TRUE in exp extension file in NAME=”CopyVmStorage” TYPE=”boolean”><VALUE>FALSE</VALUE>

To this:

NAME=”CopyVmStorage” TYPE=”boolean”><VALUE>TRUE</VALUE>

F.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
System Admin
Commented:
solution is to use HYPER-V powershell module. export and import. can be downloaded here

http://pshyperv.codeplex.com. Once it is installed on your hyper-V.

The run the following commanf to export configuration only

export-vm VMname d:\location , eg export-vm sql01 d:\exportvms

after that, manually create virtual hard disks folder in the location and copy the VHS and avhd files of the original VM to the Virtual hard Disk folder.

then run the import as follows

import-vm d:\location\VMname, eg. import-vm d:\location\sql01