<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>10.8. Virtual Machine Snapshots for VMware</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Admin_Guide-4.2.0-en-US-1-" /><script type="text/javascript" src="../../../../../toc.js"></script><script type="text/javascript">
              addID('Apache_CloudStack');
              
	      addID('Apache_CloudStack.4.2.0');
              
              addID('Apache_CloudStack.4.2.0.books');
	      addID('Apache_CloudStack.4.2.0.Admin_Guide');
              </script><link rel="home" href="index.html" title="CloudStack Administrator's Guide" /><link rel="up" href="virtual-machines.html" title="Chapter 10. Working With Virtual Machines" /><link rel="prev" href="host-allocation.html" title="10.7. Assigning VMs to Hosts" /><link rel="next" href="changing-vm-name-os-group.html" title="10.9. Changing the VM Name, OS, or Group" /></head><body class="toc_embeded "><div id="tocdiv" class="toc"><iframe id="tocframe" class="toc" src="../../../../toc.html">This is an iframe, to view it upgrade your browser or enable iframe display.</iframe></div><p id="title"><a class="left" href="http://cloudstack.apache.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://cloudstack.apache.org/docs"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="host-allocation.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="changing-vm-name-os-group.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="vm-snapshots" lang="en-US"><div class="titlepage"><div><div><h2 class="title">10.8. Virtual Machine Snapshots for VMware</h2></div></div></div><div class="para">
		(VMware hosts only) In addition to the existing CloudStack ability to snapshot individual VM volumes, you can now take a VM snapshot to preserve all the VM's data volumes as well as (optionally) its CPU/memory state. This is useful for quick restore of a VM. For example, you can snapshot a VM, then make changes such as software upgrades. If anything goes wrong, simply restore the VM to its previous state using the previously saved VM snapshot.
	</div><div class="para">
		The snapshot is created using the VMware native snapshot facility. The VM snapshot includes not only the data volumes, but optionally also whether the VM is running or turned off (CPU state) and the memory contents. The snapshot is stored in CloudStack's primary storage.
	</div><div class="para">
		VM snapshots can have a parent/child relationship. Each successive snapshot of the same VM is the child of the snapshot that came before it. Each time you take an additional snapshot of the same VM, it saves only the differences between the current state of the VM and the state stored in the most recent previous snapshot. The previous snapshot becomes a parent, and the new snapshot is its child. It is possible to create a long chain of these parent/child snapshots, which amount to a "redo" record leading from the current state of the VM back to the original.
	</div><div class="para">
		If you need more information about VM snapshots, check out the VMware documentation and the VMware Knowledge Base, especially <a href="http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&amp;externalId=1015180">Understanding virtual machine snapshots</a>.
	</div><div class="section" id="vm-snapshot-restrictions"><div class="titlepage"><div><div><h3 class="title">10.8.1. Limitations on VM Snapshots</h3></div></div></div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
					If a VM has some stored snapshots, you can't attach new volume to the VM or delete any existing volumes. If you change the volumes on the VM, it would become impossible to restore the VM snapshot which was created with the previous volume structure. If you want to attach a volume to such a VM, first delete its snapshots.
				</div></li><li class="listitem"><div class="para">
					VM snapshots which include both data volumes and memory can't be kept if you change the VM's service offering. Any existing VM snapshots of this type will be discarded.
				</div></li><li class="listitem"><div class="para">
					You can't make a VM snapshot at the same time as you are taking a volume snapshot.
				</div></li><li class="listitem"><div class="para">
					The "quiesce" option is not supported. This option is provided by the underlying VMware snapshot facility so that you can choose whether to quiesce the file system on a running virtual machine before taking the snapshot. In CloudStack, the quiesce option is always set to false; the file system is not quiesced before taking a snapshot of a running VM.
				</div></li><li class="listitem"><div class="para">
					You should use only CloudStack to create VM snapshots on VMware hosts managed by CloudStack. Any snapshots that you make directly on vSphere will not be tracked in CloudStack.
				</div></li></ul></div></div><div class="section" id="vm-snapshot-configure"><div class="titlepage"><div><div><h3 class="title">10.8.2. Configuring VM Snapshots</h3></div></div></div><div class="para">
			The cloud administrator can use global configuration variables to control the behavior of VM snapshots. To set these variables, go through the Global Settings area of the CloudStack UI.
		</div><div class="informaltable"><table border="1"><colgroup><col width="50%" /><col width="50%" /></colgroup><thead><tr><th class="" align="left">
							<div class="para">
								Configuration Setting Name
							</div>
						</th><th class="" align="left">
							<div class="para">
								Description
							</div>
						</th></tr></thead><tbody><tr><td class="" align="left">
							<div class="para">
								vmsnapshots.max
							</div>
						</td><td class="" align="left">
							<div class="para">
								The maximum number of VM snapshots that can be saved for any given virtual machine in the cloud. The total possible number of VM snapshots in the cloud is (number of VMs) * vmsnapshots.max. If the number of snapshots for any VM ever hits the maximum, the older ones are removed by the snapshot expunge job.
							</div>
						</td></tr><tr><td class="" align="left">
							<div class="para">
								vmsnapshot.create.wait
							</div>
						</td><td class="" align="left">
							<div class="para">
								Number of seconds to wait for a snapshot job to succeed before declaring failure and issuing an error.
							</div>
						</td></tr></tbody></table></div></div><div class="section" id="vm-snapshot-usage"><div class="titlepage"><div><div><h3 class="title">10.8.3. Using VM Snapshots</h3></div></div></div><div class="para">
			To create a VM snapshot using the CloudStack UI:
		</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Log in to the CloudStack UI as a user or administrator.
				</div></li><li class="listitem"><div class="para">
					Click Instances.
				</div></li><li class="listitem"><div class="para">
					Click the name of the VM you want to snapshot.
				</div></li><li class="listitem"><div class="para">
					Click the Take VM Snapshot button. 
					<span class="inlinemediaobject"><img src="./images/VMSnapshotButton.png" /></span>
				</div><div class="note"><div class="admonition_header"><h2>Note</h2></div><div class="admonition"><div class="para">
						If a snapshot is already in progress, then clicking this button will have no effect.
					</div></div></div><div class="para">
				</div></li><li class="listitem"><div class="para">
					Provide a name and description. These will be displayed in the VM Snapshots list.
				</div></li><li class="listitem"><div class="para">
					(For running VMs only) If you want to include the VM's memory in the snapshot, click the Memory checkbox. This saves the CPU and memory state of the virtual machine. If you don't check this box, then only the current state of the VM disk is saved. Checking this box makes the snapshot take longer.
				</div></li><li class="listitem"><div class="para">
					Click OK.
				</div></li></ol></div><div class="para">
			To delete a snapshot or restore a VM to the state saved in a particular snapshot:
		</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Navigate to the VM as described in the earlier steps.
				</div></li><li class="listitem"><div class="para">
					Click View VM Snapshots.
				</div></li><li class="listitem"><div class="para">
					In the list of snapshots, click the name of the snapshot you want to work with.
				</div></li><li class="listitem"><div class="para">
					Depending on what you want to do:
				</div><div class="para">
					To delete the snapshot, click the Delete button. 
					<span class="inlinemediaobject"><img src="./images/delete-button.png" /></span>
				</div><div class="para">
					To revert to the snapshot, click the Revert button. 
					<span class="inlinemediaobject"><img src="./images/revert-vm.png" /></span>
				</div></li></ol></div><div class="note"><div class="admonition_header"><h2>Note</h2></div><div class="admonition"><div class="para">
				VM snapshots are deleted automatically when a VM is destroyed. You don't have to manually delete the snapshots in this case.
			</div></div></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="host-allocation.html"><strong>Prev</strong>10.7. Assigning VMs to Hosts</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="changing-vm-name-os-group.html"><strong>Next</strong>10.9. Changing the VM Name, OS, or Group</a></li></ul></body></html>
