As I’ve described in a previous post I’ve restaged my laptop with a dual boot system including Windows 7 and Windows Server 2008 R2 including Hyper-V. This also means I have to start updating my Virtual PC images to Hyper-V.
Some information on how to migrate from earlier version (like Virtual Server or Virtual PC) can be found here:
I do not have enough disk space on my new SSD to hold all my Virtual Machine at once, which means I will have to copy my machines back and forth between my large and slower external disk to my small and very quick SSD.
Identifying which files belong to my Virtual Machines is somewhat harder in Hyper-V compared to predecessors. The structure of Virtual Machines in Hyper-V differs from Virtual PC and Virtual Server:
As you can see Virtual Machines are reference by a GUID which means I can’t easily find a way to copy the right files to my external disk. Same goes for Virtual Hard Disks and Snapshots. Luckily Hyper-V has a natively build in Export and Import functionality.
When you select the Virtual Machine to export you are prompted for the path
The Virtual Machine will now be exported to the given directory, which includes:
Importing your Virtual Machines is just as easy. Select the Import option in the Hyper-V management console.
You are prompted for the Hyper-V virtual machine location.
Two imported questions are also asked:
- Whether this virtual machine is considered to have move or copied. Move means that Machine ID’s will remain the same. Copy will create new ones.
- If you have not selected the checkbox for “Duplicate all files…” the import process will delete existing EXP and Config files at the import location. This means that this particular machine can not be imported again unless it’s exported first. Checking this box prevents this behavior. Checking the “Duplicate all files…” checkbox will also copy the virtual hard disk to the designated folder in Hyper-V.
This means I can now easily copy virtual machine back and forth.
More on importing and exporting Hyper-V virtual machines can be found here: