Pre-reserve state of VM.
When a snapshot is created, it is comprised of these files:
- <vmname>-<number>.vmdk and <vm>-<number>-delta.vmdkA collection of .vmdk and -delta.vmdk files for each virtual disk is connected to the virtual machine at the time of the snapshot. These files can be referred to as child disks, redo logs, or delta links. These child disks can later be considered parent disks for future child disks. From the original parent disk, each child constitutes a redo log pointing back from the present state of the virtual disk, one step at a time, to the original.Note:
- The <number> value may not be consistent across all child disks from the same snapshot. The file names are chosen based on filename availability.
- If the virtual disk is larger than 2TB in size, the redo log file is of <vm>-<number>-sesparse.vmdk format.
- <vmname>.vmsdThe .vmsd file is a database of the virtual machine’s snapshot information and the primary source of information for the Snapshot Manager. The file contains line entries which define the relationships between snapshots as well as the child disks for each snapshot.
- <vmname>Snapshot<number>.vmsnThe .vmsn file includes the current configuration and optionally the active state of the virtual machine. Capturing the memory state of the virtual machine lets you revert to a turned on virtual machine state. With nonmemory snapshots, you can only revert to a turned off virtual machine state. Memory snapshots take longer to create than nonmemory snapshots.
Determining if a virtual machine is using snapshots:
here are three methods to determine if a virtual machine is actively using a snapshot.
Using vSphere Client and vSphere Web Client
- Connect to vCenter Server using the vSphere Client.
- Go to virtual machines tab to see that the virtual machines are registered.
- Right-click title to display the list of available columns.
- Select Needs Consolidation option. This column shows all the virtual machines that are currently running on a snapshot.
vSphere Web Client
- Connect to vCenter Server using the Web Client.
- Select the vCenter Server and go to Related Objects tab.
- Right-click on the column titles and go to Show/Hide Columns list.
- From the list of columns chose Needs Consolidation option.
Run this command to check for snapshots on a virtual machine:
vmware-cmd -H vc_system -U user -P password –vihost esx_host /vmfs/volumes/virtual_machine_datastore/ virtual_machine/virtual_machine.vmx hassnapshot
Using the virtual machine’s Snapshot Manager
- Log in to to the VMware vSphere or Infrastructure Client.
- Right-click on the virtual machine and select Snapshot > Snapshot Manager.
If a snapshot is listed, the virtual machine is attached to one or more virtual disks which are in a snapshot state.
- In vSphere Web Client, Right-click the virtual machine and click the Manage Snapshots option to view a list of snapshots.
- In some cases, it is still possible that a virtual machine disk snapshot exists without it being identified and managed by the Snapshot Manager.
Viewing the virtual machine configuration file
- Open the VMware vSphere or Infrastructure Client.
- Right-click on the virtual machine and click Edit Settings.
- One by one, select the virtual disk of the virtual machine and review to the referenced filename of each disk. The path appears similar to:[DatastoreName] VM_Name/vDisk_File_Name.vmdkA virtual machine that is referencing a snapshot, however, would appear similar to:[DatastoreName] VM_Name/VM_Name-000001.vmdk.
Viewing the virtual machine configuration file from the ESX console
- Log in to the VMware ESX host’s terminal. For VMware ESXi hosts,
- Change to the directory that contains the virtual machine.# cd /vmfs/volumes/<datastore>/<virtual machine>/
- Run the command:# egrep -i “scsi[0-9]+:[0-9]+.present|scsi.*filename” FILE.vmx