Monday, December 22, 2008

How to View ESX Running Tasks

Sometime when you are managing your ESX hosts with VC connection to your VI, you might get the 'connection time out' when doing something that takes longer that 15 minutes (hard coded), for example, merging/deleting a huge snapshot file

To view whether or not the task is still running on your host, SSH to your host

#> vimsh

[/]$ vimsvc/task_list
(ManagedObjectReference) [
'vim.Task:haTask-1488-vim.vm.Snapshot.remove-169152700', 'vim.Task:haTask-1520-vim.VirtualMachine.removeAllSnapshots-169152743', 'vim.Task:haTask-1520-vim.vm.Snapshot.remove-169152682', 'vim.Task:haTask-ha-root-pool-vim.ResourcePool.createResourcePool-169152886', 'vim.Task:haTask-ha-root-pool-vim.ResourcePool.updateConfig-169152786'
]

To view a specific task:

[/]$ vimsvc/task_info haTask-1488-vim.vm.Snapshot.remove-169152700
(vim.TaskInfo) {
dynamicType = ,
key = "haTask-1488-vim.vm.Snapshot.remove-169152700",
task = 'vim.Task:haTask-1488-vim.vm.Snapshot.remove-169152700',
name = "vim.vm.Snapshot.remove",
descriptionId = "vm.Snapshot.remove",
entity = 'vim.VirtualMachine:1488',
entityName = "ausyddbt04",
state = "running",
cancelled = false,
cancelable = false,
error = (vmodl.MethodFault) null,
result = ,
progress = 95,
reason = (vim.TaskReasonUser)
{ dynamicType = , userName = "vpxuser", }, queueTime = "2008-12-22T03:29:20.870373Z", startTime = "2008-12-22T03:29:20.870373Z", completeTime = , eventChainId = 169152700,
}

No comments: