Solved

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

Posted on 2008-10-09
1
1,248 Views
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?
0
Comment
Question by:user5500
1 Comment
 
LVL 6

Accepted Solution

by:
xfreddie earned 500 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

Goodluck,
Xfreddie
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unable to increase disk of VM 3 54
cannot login vpxuser@127.0.0.1 11 76
vSphere Clustering DRS 3 27
esxi host, bios screen, time appears to be UTC 14 29
HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

839 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