Solved

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

Posted on 2008-10-09
1
1,249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
New Relic 3 54
Hit router interface limit 7 66
VMware vSAN 6.5 usage example and caveats 11 161
Isolated network on ESXi 6.5 8 45
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
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…
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.

756 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