Querying Events for a VM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Querying Events for a VM

Sri Mandaleeka

I want to detect Events (all)  for a particular VM :
Once I have the VM MOREF , I do the following:

#Step1 : Create a EventFilterSpecByEntity
            efespec = vim.event.EventFilterSpec.ByEntity()
            efespec.entity = vm
            efespec.recursion = vim.event.EventFilterSpec.RecursionOption.all
#Step2 :Event Spec Filter
            efspec = vim.event.EventFilterSpec()
            efspec.entity = efespec
#Step3: QueryEvents
           events = si.content.eventManager.QueryEvents(efspec)

I get the following errors : any ideas is QueryEvents implemented to start off with ?

 print si.content.eventManager.QueryEvents(efspec)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/VmomiSupport.py", line 542, in <lambda>
  File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/VmomiSupport.py", line 351, in _InvokeMethod
  File "/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/SoapAdapter.py", line 1231, in InvokeMethod
pyVmomi.VmomiSupport.NotImplemented: (vmodl.fault.NotImplemented) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'The requested operation is not implemented by the server.',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) []