VMware {code} Community
dmitrif
Enthusiast
Enthusiast

CreateCollectorForTasks fails

Hi folks,

CreateCollectorForTasks fails with "The requested operation is not implemented by the server."

Is this only me or this does not workat all?

How else do I retrieve history of tasks?

Thanks in advance.

D.
0 Kudos
4 Replies
njain
Expert
Expert

CreateCollectorForTasks is the correct method to get the history of tasks. However, this method is only supported on VirtualCenter Server. In case you are executing this method on ESX, you will encounter the above stated error.

You can also refer to "Retrieving Historical Task Information" section in the SDK Programming guide for more details

http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/visdk25programmingguide.pdf

dmitrif
Enthusiast
Enthusiast

Neha,

Thanks for your answer; the Guide is my table book and I could not find there anything that would tell me that QueryEvents works for VC, but does not for ESX, so I'm suppose to use the "CreateCollectorForEvents" on ESX and assuming that "CreateCollectorForTasks" also works for ESX is wrong.

What do I use for retrieving tasks on ESX then? There is no QueryTasks :)...

What do I use on VC and ESX for events and tasks?

Both events and tasks use history collectors, why don't they work in the same way?

D.
0 Kudos
njain
Expert
Expert

If you go to Appendix B: Managed Object Privileges Reference, you will see all the operations along with the privileges required to perform these operations and the information regarding which operation is supported on VC and ESX.

As you will see in this section, "CreateCollectorForEvents" works for both VC and ESX. However, "CreateCollectorForTasks" is only supported on VC based on its implementation.

dmitrif
Enthusiast
Enthusiast

What does it mean "not supported based on its implementation"? Short of developers to implement it? Or implemented it but it doesn't work? Smiley Happy

This means the task history is not available for retrieval from ESX, correct?

D.
0 Kudos