Jan 032009
 

Windows Server 2008 Hyper-V virtualisation doesn't offer an out of the box option to clone an existing Virtual Machine (VM) into a new one. However, this doesn't  mean it is not possible or is very difficult. In fact, its quite easy and simple to clone a Virtual Machine in Hyper-V


There are two ways you can clone a VM in Hyper-V.

1. Using the import/export VM feature available in Hyper-V

2. Copying a Virtual Hard Disk and create a new VM using that Hard Disk.

1. Import/Export feature to clone a VM in Hyper-V

This is a simple and easy way to clone a Virtual Machine (VM). But, the only low side of it is that the import of VM will only work on any VM which was exported from a Hyper-V Virtual system.

Export VM

From the Hyper-V Manager, right-click on the VM and select Export. Choose a location where the exported VM will be saved. It is important to note that when you import this VM back from that location, its Virtual machine and virtual Hard Disk location will be set as this location and not the default location.

vm_export

While exporting a VM, you can choose to export only the VM and not its Virtual hard Disk (VHD). This can be particularly useful when you want to create a new VHD and perform fresh install.

vm_export2cialis online without prescription

” />

Import VM

To import the Virtual Machine (VM), click “Import Virtual Machine” from the Action menu in the right of the Hyper-V Manager. Browse to the location where the VM was exported to and then click Import.

vm_import

vm_import2

Again, it is important to note that the location is the exact location to where original VM was exported to and not any of its sub-directories.

Once, the VM is imported, you can change the settings as you would with any other VM. If you bring this VM online in the same Virtual Network as that of the original VM and that the original VM is still live on that network then it would be ideal to disable the network on this newly imported VM and change the hostna,e,IP Address settings from within the VM to avoid any network issues.

2. Copy VHD and Create new VM

This is quick and dirty way doing a clone on a VM. Simply make a copy of the VHD from the original VM and use it when creating a new VM instead of creating a new VHD for that VM. To create a new VM, click here. In the wzard, when you hit the “Connect Virtual Hard Disk” window, select the option “Use an existing virtual Hard Disk” and select the location of the copied VHD.

This will do!!!

zp8497586rq

Incoming search terms:

  6 Responses to “Hyper-V: How to clone a Virtual machine (VM)”

  1. [If the] original VM is still live on that network then it would be ideal to disable the network on this newly imported VM and change the hostna,e,IP Address settings from within the VM to avoid any network issues.

    Aside from the typo, I changed the host name and removed it from the domain, and added it back in. Then my original image would not boot to the domain, saying it was already on the domain. Am I missing something here? Thanks! Great article btw.

  2. Hi, thanks for the article but you barely talk about duplicate machine/SID issues. Yes, the instructions you give will definitely clone the VM but if you try to run the newly cloned VM and the original VM on the same Hyper-V server you’re going to have all kinds of problems with duplicate machine names, SID’s, IP’s, etc. You should consider adding something that talks about SYSPREP, NEWSID or SCVMM.

  3. Might want to look at this regarding the duplicate SID issue.

    The Machine SID Duplication Myth
    by Mark Russinovich – 3 Nov 2009 12:00 AM

    http://blogs.technet.com/b/markrussinovich/archive/2009/11/03/3291024.aspx

  4. Thanks for this. Copying the VHD is much more straight forward. Worked for me.

  5. This article is completely wrong, and will only create MASSIVE problems for your network. You will have duplicate SID’s, network problems galore.

    The VHD cannot just be copied – you will get blue screens at bootup. There are other files created by the Hyper V manager that tie to that VHD with data about its setup. Find a better article than this one to do it right.

  6. I do agree just copying VMs will have issues with SIDs etc.
    There are other ways to clone it I am also looking for a right Way SCVMM is one of them as Give u an option of changing SIDs after restart also it takes care of duplicate IPs and so On.

Sorry, the comment form is closed at this time.