VMware Self-Service- Command to monitor snapshot deletion

September 23, 2009 — 2 Comments

Taken from >> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007566

Command to monitor snapshot deletion

Symptoms

During the snapshot deletion process, it is difficult to observe the progress. While the snapshot deletion is taking place, the following may occur:

  • The hostd process does not respond
  • It is difficult to determine status of snapshot deletion
Purpose

While there is no way to track snapshot deletion progress, you can monitor the directory and wait for the contents to indicate completion.

Resolution

Perform the following:

  1. Log in as root to the ESX Server using SSH.
  2. Change directory to the correct folder containing the vmdk file(s).
  3. Examine the directory listing by issuing the command: ls -al
  4. Determine if there are any VM_NAME-00000#.vmdk files, VM_NAME-00000#-delta.vmdk file, or similar. Look for numbered files following the dash in the name. These files indicate the presence of snapshots.
  5. Use the following command to monitor the snapshot deletion process:
    #watch "ls -Ghtu –full-time *.vmdk"
    Where:
    G inhibits display of group information to shorten the output display
    h – prints sizes in a readable format like 1K 234M 2G
    t – sorts by modification time
    u – with -lt: sorts by and shows access time
    full-time – like -l –time-style=full-iso
  6. This command continuously monitors the contents of the directory.  You should notice the snapshot files dissapear once they are deleted.

VMware Self-Service- Command to monitor snapshot deletion

2 responses to VMware Self-Service- Command to monitor snapshot deletion

  1. 

    Much better to do it like this (taken from VMworld Europe 2008 session TA14:

    To check if the operation is still running:

    [root@esx root]# vimsh -ne “vimsvc/task_list”
    ‘vim.Task:haTask-240-vim.VirtualMachine.removeAllSnapshots-54474’,
    ‘vim.Task:haTask–vim.SessionManager.acquireLocalTicket-54451’,
    ‘vim.Task:haTask–vim.SessionManager.login-54452’,

    Select the task from the list and run:

    [root@esx root]# vimsh -ne “vimsvc/task_info \
    haTask-240-vim.VirtualMachine.removeAllSnapshots-54474”

    Examine the output and check the ‘status’ and ‘progress’:

    ….
    state = “running”, <- The task is still running
    progress = 95,
    ….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s