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.
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.
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.
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.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!!!
Post a Comment