Wednesday 28 October 2009

Clone a Hyper-V virtual machine without SCVMM

Original post: http://tech.in4mr.com/2009/09/clone-hyper-v-vm-without-scvmm.html

Clone a Hyper-V virtual machine without SCVMM

The following assumes that you have created a machine that you would like to use as a template.

**Sysprepping this machine is not required, but if you will be making more than one copy I highly recommend it (sysprep instructions follow post).

1. Right click on the template machine in Hyper-V Manager and choose Export (Do Not Start a Template)

2. Choose the
\ directory for a destination

3. Wait for the export to complete

4. Move the files and folders under
\\__ up one level to \

5. Delete the folder
\\__

6. In Hyper-V Manager choose “Import a Virtual Machine” from the Action menu on the top right

7. Import from the folder
\

8. You will now see two <_template_name_> Virtual Machines in Hyper-V Manager

9. Right click the bottom one (it will have the most recent date) and rename it to your


10. Right click the
Virtual Machine and choose “Settings” from the context menu

11. On the left hand side click on the Hard Drive named
(it should be under IDE Controller 0) ** image A**

12. Click Remove

13. Repeat steps 11 and 12 for all hard disks

14. Close Settings

15. Open Windows Explorer and Navigate to
\\Virtual Hard Disks

16. Rename
.vhd to .vhd

17. Repeat step 15 for all remaining hard disks

18. Close Windows Explorer

19. In Hyper-V Manager right click the
Virtual Machine and choose “Settings” from the context menu

20. On the left hand side click on IDE Controller 0 and select “Hard Disk” and click “ADD”

21. Repeat for remaining Hard Disks

a. If possible attach these to a SCSI Controller (this may have to be added via “Add Hardware” at the top of the page)

22. Close Settings

23. Right click the
Virtual Machine and choose “Start”

24. Right click the
Virtual Machine and choose “Connect”

If your template machine had Sysprep run on it:

25. The Virtual Machine’s screen will be grey for a while and then show what appears to be a Windows Server Setup Screen

26. Choose next, Accept the Eula and Enter
when you are prompted for a machine name

27. Click next and the system will load for a while and then present you with the logon screen

Sysprep: http://technet.microsoft.com/en-us/library/cc766514(WS.10).aspx

Gotchas?: Make sure to read the links below if your going to sysprep a machine with Sql Server or Hyper-V
Sysprep a Sql Server: http://support.microsoft.com/kb/303774
Sysprep a Hyper-V Server: Http://blogs.msdn.com/mikekol/archive/2008/03/25/hyper-v-installation-tricks-part-1-sysprep-and-hyper-v.aspx

No comments:

Post a Comment