How to clone / copy a Windows 8 Hyper-V client virtual machine

If you want to make a clone / copy of an existing Windows 8 Hyper-V client virtual machine, follow the steps below:

 

Run Import wizard

Run the Hyper-V manager.

Click [Export Virtual Machine…].

Choose a export folder eg [C:\VHD\W8RLIDEV2012]

image

 

I will always move the contents of the created folder to the root folder, see screendump, but this is not necessary.

 

image

 

Click [Import Virtual Machine…].
On the Locate Folder page, enter the folder containing the Virtual Machine you want to clone / copy eg [C:\VHD\W8RLIDEV2012\Virtual Machines]

 

image

On the [Choose Import Type] page choose [Copy the virtual machine (create a new unique ID)].

 

image

 

Note

I use the location of the virtual machine to store snapshots etc.

 

image

 

On the [Choose Folders to Store Virtual Hard Disks] choose [C:\VHD\W8RLIDEV2012\Virtual Hard Disks]

image

 

The last thing I do is rename the Virtual Machine in the Hyper-V Manager.

 

image

How to boot from an VHD without host OS

You can format the drive of you’re laptop, copy a VHD file to the laptop, by using the Windows 7 installation DVD and than boot from the VHD file.

The hard drive will contain only one file: C:\VHD\MyVritualMachine.vhd

 

This post is just a summary of the post: https://www.roelvanlisdonk.nl/?p=1530 it will describe the steps, how to copy a working VHD image to an “empty” laptop and boot from the VHD file.

Notes

– VHD should run Windows 2008 R2 or Windows 7

 

1. Boot into you’re VHD on machine A

2. execute C:\Windows\System32\sysprep\sysprep.exe

[Out-of-Box Experience (OOBE) and check the Generalize checkbox]

3. Boot from the Windows 7 DVD on Machine B

4. Run the installation of Windows 7 only to the step where you can format the hard drive

5. Format the hard drive (now 2 partitions will be created, one 100MB and one the rest of you’re hard drive)

6. Press SHIFT F10 to open a command window during installation

7. Edit the boot manager by using the bcdedit.exe tool:

    • bcdedit /copy {current} /d “MyMachine Description

    • The previous statement returns a GUID like: {aa2e3972-7a31-11df-987b-b52175dc348f}

    • bcdedit /set {aa2e3972-7a31-11df-987b-b52175dc348f} device vhd=[C:]\VHD\MyVritualMachine.vhd

    • bcdedit /set {aa2e3972-7a31-11df-987b-b52175dc348f} osdevice vhd=[C:]\VHD\MyVritualMachine.vhd

    • bcdedit /set {aa2e3972-7a31-11df-987b-b52175dc348f} detecthal on

    • bcdedit /set hypervisorlaunchtype auto

    • The previous statement is only needed when the virtual machine is running Microsoft Windows 2008 R2 with the hyper-v role enabled.

  • Reboot Machine B

  • After rebooting you should see two entries one with the description “Windows 7” and an other with the description “MyMachine Description

If you laptop requires SATA III drivers just copy these drivers to a USB stick, so it can be used in the mini setup run on every syspreped machine.

Now I know why the Windows Experience Index does not work, when you boot from VHD: SSD 1048 MB/s write and 1193 MB/s read?

If I boot from a VHD file and run the ATTO benchmark on my Vertex 3 OS SSD.

I get the following results: 1048 MB/s write and 1193 MB/s read. Well the Vertex 3 SSD is the fastest SSD I worked with, but this can’t be right.

 

BenchmarkVertex3BootFromVhd

 

When the ATTO benchmark is run from a normal booted system, I get the following results: 503 MB/s write and 557 MB/s read on my DELL XPS L702.x. That’s what I suspected.

 

image

 

When I benchmark a normal HDD I get: 69 MB/s write and 69 MB/s read.

 

image