How to monitor snapshot deletion using the vim-cmd command
search cancel

How to monitor snapshot deletion using the vim-cmd command

book

Article ID: 316632

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides information to monitor the snapshot deletion/consolation process using the vim-cmd command.

Environment

VMware vSphere ESXi

Resolution

To monitor snapshot deletion/consolidation using the vim-cmd command:
 

  1. Open an SSH shell session to the host that is performing the consolidation and snapshot deletion task by running this command:

    vim-cmd vimsvc/task_list

    Example output:

    (ManagedObjectReference) [
    'vim.Task:haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994'
    ]
     
  2. To retrieve more information about the task run the following command:

    vim-cmd vimsvc/task_info <enter task string>

    Example command:

    vim-cmd vimsvc/task_info haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994


    Example output:

    (vim.TaskInfo) {
    dynamicType = ,
    key = "haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994",
    task = 'vim.Task:haTask-9-vim.VirtualMachine.removeAllSnapshots-304060994',
    description = (vmodl.LocalizableMessage) null,
    name = "vim.VirtualMachine.removeAllSnapshots",
    descriptionId = "VirtualMachine.removeAllSnapshots", --running process>
    entity = 'vim.VirtualMachine:9', 
    entityName = "VirtualMachineName",  ---Virtual Machine name>
    state = "running",---make sure the status is running & is not in a error state>
    cancelled = false,
    cancelable = false,
    error = (vmodl.MethodFault) null,
    result = ,
    progress = 33, ---progress of task>
    reason = (vim.TaskReasonUser) {
    dynamicType = ,
    userName = "root",
    },
    queueTime = "2013-10-02T07:22:02.224526Z",
    startTime = "2013-10-02T07:22:02.225526Z",
    completeTime = ,
    eventChainId = 304060994,
    changeTag = ,
    parentTaskKey = ,
    rootTaskKey = ,
    }

 

Note: A complete and successful consolidation of the snapshot will show state = "success" when you run the above command.