Unless otherwise noted, articles © 2005-2008 Doug Spencer, SecurityBulletins.com. Linking to articles is welcomed. Articles on this site are general information and are NOT GUARANTEED to work for your specific needs. I offer paid professional consulting services and will be happy to develop custom solutions for your specific needs. View the consulting page for more information.

Cloning a VMWare Server instance

From SecurityBulletins.com

Jump to: navigation, search

Written by Doug Spencer - 11/16/2006


Cloning a VMWare instance is fairly easy to do. The easiest way is to copy the entire directory that contains a virtual machine to another directory and create a new virtual machine in the GUI, selecting the "Custom" option for the type of virtual machine. Select the copy of your old disks, but create a new configuration file so you have a unique MAC address for the virtual machine. To clean up, you can delete the old .vmx file, which holds the overall VM configuration.

If you want to get more complex, you can change the disk names, but that will require editing the DISKNAME.vmdk file that describes the disk mapping. The file will contain entries similar to the following. In the following example, the file would be named "VMWare.vmdk"

# Disk DescriptorFile

# Extent description
RW 4193792 FLAT "VMname-f001.vmdk" 0
RW 4193792 FLAT "VMname-f002.vmdk" 0
RW 4193792 FLAT "VMname-f003.vmdk" 0
RW 4193792 FLAT "VMname-f004.vmdk" 0
RW 2048 FLAT "VMname-f005.vmdk" 0

# The Disk Data Base 

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "1044"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"
ddb.toolsVersion = "6530"

Simply change all the "VMname" items to your new disk name. You should then perform the procedure described above to create a new configuration file by doing a custom install and selecting the copied disks.

This procedure has worked for me with VMware Server 1.0.1. It works well to clone virtual machines for development, distributing load, or increased capacity. If you keep the virtual machines pretty generic, you can have one image that you promote from development to integration and production environments.

Personal tools