The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
Commands to monitor snapshot deletion in ESX 2.5/3.x/4.x and ESXi 3.x/4.x/5.x (1007566)
- Cannot observe the progress when deleting a snapshot.
- It is difficult to determine status of snapshot deletion.
- Snapshot removal task stops at 95% and does not appear to proceed.
- The hostd process does not respond.
- Storage vMotion operation stays at 18% for a long time.
watchcommand and waiting for the snapshot deletion operations to complete in ESX and ESXi.
For more information on how snapshots work, see Understanding virtual machine snapshots in VMware ESXi and ESX (1015180).
Note: Time involved to commit snapshots is environmental and subjective.
ESX 3.5/4.x and ESXi 4.1/5.x
To monitor directories during snapshot deletion in ESX 3.5/4.x and ESXi 4.1/5.x:
- Log in as root to the ESX host using SSH. For more information, see Connecting to an ESX host using a SSH client (1019852) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910)
- Navigate to the virtual machine directory containing vmdk virtual disk files.
- List files in the directory by executing:
# ls -al
- Determine any VM_NAME-00000#.vmdk or VM_NAME-00000#-delta.vmdk snapshot files. Look for numbered files following the hyphen(-) in the name.
- To monitor the VMDK snapshot and base disks which are currently being updated use the following watch command:
# watch -d 'ls -luth | grep -E "delta|flat"'
-d highlights the differences between successive updates
t sorts by modification time
l shows a long listing which displays additional file information
u sorts by and shows access time
h prints sizes in a readable format like 1K 234M 2G
You can also run the following command to monitor the time stamp update of the base disks to confirm if the process is working or not.
ls -lrt |grep -E "flat|delta"
This command monitors the contents of a directory and displays files by their modification date.
Note: In ESX 3.5 and 4.0 (pre Update 2) the snapshot delta files will be written to the previous snapshot delta file and so on and are finally written to the base disk (flat). In ESX/ESXi 4.0 Update 2 and later the process works differently in that the data in snapshots (deltas) are written directly to the base disk (flat). For more information on the snapshot process, see Understanding virtual machine snapshots in VMware ESXi and ESX (1015180) and Consolidating snapshots (1007849).
If there are more than 10 snapshots, use this command to monitor the snapshot commit process and to prevent the screen from filling with too many files:
# while true;do date;ls -lht *vmdk|head -10;echo ________;sleep 3;done
Note: You can quit the consolidation process monitoring by pressing Ctrl + C.
To monitor directories during snapshot deletion in ESXi 3.5/4.0:
- Log in as root to the ESXi host using the Tech Support mode. For more information, see Tech Support Mode for Emergency Support (1003677).
- Change to the virtual machine directory /vmfs/volumes/datastore/VM.
- Open a text editor such as vi or nano and create the file snapmon. For more/related information, see Editing files on an ESX host using vi or nano (1020302).
- Add this script the the file:
while [ 1 ]
date;ls -luth *.vmdk
- Click Save and close the file.
- Run this command to make this file executable:
# chmod ug+x snapmon
- Commit the snapshot from the Snapshot Manager.
- Execute the snapmon script to monitor the snapshot:
Note: This process can be sent to background and brought to foreground using the fg command.
You can locate most recent pid (/bin/sh) using the ps ax command.
To kill a running snapmon, run the command:
# kill <pid>
/vmfslike a general-purpose file system. For example, do not store temporary or data files under
/vmfs. Operations such as
chown, and any commands that use the
open()function or that otherwise modify file properties that are very fast on normal non-distributed file systems are significantly more costly on distributed file systems like VMware VMFS.
Avoid these operations unless absolutely necessary. For example, as a result of the high expense of
tail -f fileis relatively safe, but
tail filecan cause problems.
For more information, see VMware ESX Server: Third-Party Software in the Service Console.
The Delete all snapshots process has significantly improved in these ESX patches. VMware recommends that you install them for performance improvements:
- Consolidating snapshots in ESX/ESXi 3.x and 4.x
- Understanding virtual machine snapshots in VMware ESXi and ESX
- Using Tech Support Mode in ESXi 4.1 and ESXi 5.x
- Editing files on an ESX host using vi or nano
This Article Replaces
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.