Solved

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

Posted on 2008-10-09
1
1,252 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

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Esxi host upgrade 16 99
Powercli - VMCreation Script, fails upon begin {}, Process {}, End {} 1 50
How many VMs can run 7 76
vmfs data store with same UUID 9 23
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
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.

739 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