Wednesday, 2 July 2014

Cloning a virtual machine using VMware


A clone is a copy of an existing virtual machine. The existing virtual machine is called the parent of the clone. When the cloning operation is complete, the clone is a separate virtual machine — though it may share virtual disks with the parent virtual machine. Changes made to a clone do not affect the parent virtual machine. Changes made to the parent virtual machine do not appear in a clone.
Why Make a Clone? Installing a guest operating system and applications can be time consuming. With clones, you can make many copies of a virtual machine from a single installation and configuration process. Clones are useful when you must deploy many identical virtual machines to a group.
With clones you can conveniently make complete copies of a virtual machine, without browsing a host file system or worrying if you have located all the configuration files.
To create a clone using the Clone Virtual Machine Wizard:
1. Select the virtual machine you want to clone.
Click the name of a virtual machine in the Library or click the tab of a virtual machine in the summary window.
2. Open the Clone Virtual Machine Wizard (VM > Clone) and click Next.


Always cloning of a virtual machine is possible when virtual machine is power-off, if virtual machine is ON it is not possible to clone a virtual machine.

3. Select the state of the parent from which you want to create a clone, and click Next.

You can choose to create a clone from either of two states.
• From the parent's current state (Workstation creates a snapshot of the virtual machine before cloning it).
• From any snapshot of the parent: select the snapshot name from a drop-down menu of existing snapshots.
Full and Linked Clones:
There are two types of clones
A full clone is an independent copy of a virtual machine that shares nothing with the parent virtual machine after the cloning operation.
A linked clone is a copy of a virtual machine that shares virtual disks with the parent virtual machine in an ongoing manner. Cloning a virtual machine from current state.
4. Select the type of clone you want to create and click Next.

5. Type a name and a path for the cloned virtual machine, and click Finish.

The default name and path are based on the original virtual machine name and location. You can type a new entry for name and path, or use the Browse button to locate a directory for the clone files. After you have verified your entries, click Finish. The Clone Virtual Machine Wizard then displays a status page.
A full clone can take many minutes to create, depending on the size of the virtual disk that is being duplicated. So a new virtual machine created with existing virtual machine configuration. We can change the settings as per our choice. The basic thing we need to remember when virtual machine is cloned, to change the hostname and IP-address of cloned machine.
Linked Clones:
You cannot power on or resume a linked clone, if Workstation fails to locate the parent virtual machine. If you put a linked clone on a laptop, and the parent remains on another machine, the clone can be used only when the laptop connects to the network or drive where the parent is stored. If you want to use a cloned virtual machine on a disconnected laptop, you must use a full clone or you must move the parent virtual machine to the laptop.
To prevent anyone from deleting the parent virtual machine for a linked clone, you can designate the parent as a template.
Enabling Template Mode for the Parent:
You can avoid inadvertently deleting the parent of linked clones by designating the parent virtual machine as a template. To designate a virtual machine as a template, enable template mode in the virtual machine settings editor
1. Select the virtual machine
2. Choose VM > Settings
3. Select Options
4. Click Advanced
5. Select Enable Template mode (to be used for cloning)
6. Click OK

With template mode enabled, a virtual machine cannot be deleted or added to a team, and the virtual machine's snapshots cannot be deleted.
Creating a Linked Clone From a Template:
When you create a linked clone of a template virtual machine, the Clone Virtual Machine Wizard includes several special options.
To create a linked clone from a template:
1. Select the virtual machine to use as a parent of your linked clone.
2. Verify that the parent has at least one snapshot. Open the snapshot manager and create a snapshot if none exists.
3. Verify that template mode has been enabled.
4. With the virtual machine still selected, launch the Clone Virtual Machine Wizard.
5. Click Next to display the Clone Source panel.
6. Select a snapshot from the drop-down menu and click Next.
Note: The wizard does not allow you to clone from the current state when the virtual machine has template mode enabled.
7. Name the linked clone and click Finish.
Workstation creates the linked clone and displays a status panel



No comments:

Post a Comment