Move Hyper-V VMs to a different host, by moving the physical storage

2

I have two systems running Windows 8.1, and old and new. The old box has a couple dozen Hyper-V Virtual Machines (VMs) I used for development/testing. All the VMs are stored on a 2TB drive that is separate from the OS drive. With the VHDX files in D:\Hyper-V\Virtual Hard Disks and the various hyper-v configs for the VMs in D:\Hyper-V\Virtual Machines\Virtual Machines.

I plan on simply disconnecting the drivefrom the old system, and connecting it to the new system.

What isn't obvious to me is how to re-import all the VMs back into Hyper-V on the new system.

Most of the docs I find about hyper-V migration suggests using export-vm/import-vm, but these commands basically make a full copy of the VHDX files along with the configuration.. For my purposes this is a complete waste of time. Also, I have insufficient storage space on that system for two copies of everything, and it would take a lot of time for basically no useful purpose.

I could simply create new VMs and point it at the original VHDX files, but there must be some way to automate this. Re-configuring all the various settings for each VM would tedious, and I would almost certain, miss some setting, since I have lots of VMs.

Zoredache

Posted 2014-07-03T06:49:03.583

Reputation: 18 453

Answers

1

Apparently I was over-thinking this problem. After some additional research I found that nothing needs to do as an export or prepare the VMs before moving the storage.

Migrate instructions.

  • Shut down the old system, and pull the drive with the various vhd(x), and xml files in it and transfer it to the new systems.
  • On the new system use the Import-VM powershell command with the -Register option to re-register the VMs on the new system.

I also found this blog post basically describing the procedure.

Zoredache

Posted 2014-07-03T06:49:03.583

Reputation: 18 453