Is it possible to use a VM Snapshot to create multiple systems?

Posted on 2008-10-09
Medium Priority
Last Modified: 2012-05-05
I'm not finding anything online with a clear cut answer to reusing VM snapshots to create more guest clients.  When i create a snapshot it resides in the snapshot manager of the VM I created it  under.  If I create another VM I'd like to be able to use a previous snapshot of another functioning VM so I'm not having to recreate the whole thing.  At the moment I'm using VM Converter to point to an ISO off of a windows share and create the VM or Clone it by point VM Converter to an existing VM and duplicating it but this takes such a long time; any advice?
Question by:user5500
1 Comment

Accepted Solution

xfreddie earned 2000 total points
ID: 22684622
one way to hot clone is using snapshots and vmkfstools, creating a snapshot will prevent any writes to the VMs original vmdk file as all subsequent writes are written to the delta.vmdk files that the snapshot creates. You can also use this procedure to cold clone a VM if you do not have VirtualCenter. To cold clone power off your source VM first and there is not need to create a snapshot, you can omit steps 3 and 9 below.
1) Login to the Service Console
2) Switch to your VMs directory, ie. cd /vmfs/volumes/MyVolume/MyVM1
3) To create a snapshot type through the command line you can use vmware-cmd, the syntax is: vmware-cmd <path & name.vmx file> createsnapshot <name> <description> <quiesce> <memory> ie. vmware-cmd MyVM1.vmx createsnapshot MyVM1 Snapshot Clone snapshot 1 0. Setting memory to 0 prevents the snapshotting of the VMs memory which we do not want for the clone. It will return createsnapshot(MyVM1 Clone snapshot 1 0) = 1 when it successfully creates the snapshot. Optionally you can create the snapshot using the Snapshot Manager in the VI Client.
4) Next create a new VM (for this example we will call it MyVM2) on the ESX host using the VI Client. Its best to assign the NIC for this VM to an Internal Only vswitch (no physical NICs assigned to the vswitch) so it does not conflict with the existing VM. When it comes to the hard drive you can accept the 4GB default or make it smaller since you will be deleting it anyway. Do not power this new VM on.
5) Switch to your new VMs directory and delete the vmdk files it created. Ie. cd /vmfs/volumes/MyVolume/MyVM2 and then rm *.vmdk, you will be prompted for deletion confirmation of the two vmdk files for the VM.
6) Switch back to your original VMs directory, ie. cd /vmfs/volumes/MyVolume/MyVM1
7) Use vmkfstools to copy your original disk to the new VMs directory, the format is vmkfstools i <source vmdk file> <destination vmdk file> ie. vmkfstools i MyVM1.vmdk /vmfs/volumes/MyVM2/MyVM2.vmdk
8) Once the copy completes power on your new VM, you might run chkdsk on it once it boots since you effectively powered off the VM while running and powered it back on.
9) You can now delete the original snapshot by typing vmware-cmd <path & name.vmx file> removesnapshots which will remove all snapshots for the VM. Optionally you can remove the snapshot using Snapshot Manager in the VI Client.

Step by step Information found : http://vmware-land.com/Vmware_Tips.html#VM14


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question