You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Govmomi v0.38.0, Neither task.WaitForResult nor task.WaitForResultEx work for me while trying to Power Off/On or Register VM on a standalone ESXI
#3649
Originally posted by bharadwaj-reddy-22 December 11, 2024
My code snippets.
This error is related to
vm is a object.VirtualMachine that I get through SOAP request to ESXI Host.
v is a VMwareClient which has govmomi.GovInterface which I use to make Govmomi SOAP requests. off, err := vm.PowerOff(v.ctx) if err != nil { return err } return v.TaskWaitForResult(v.ctx, off)
when I use taskInfo, err := task.WaitForResultEx(ctx) in TaskWaitForResult method I see that the task is completed from the UI of ESXI host but the WaitForResultEx keeps waiting for a response to this request
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><WaitForUpdatesEx xmlns="urn:vim25"><_this type="PropertyCollector">ha-property-collector</_this></WaitForUpdatesEx></Body></Envelope> for 10 mins.
My assumption is the task gets completed before the SOAP request for WaitForUpdateEx lands on the host and as task is completed no updates are returned and the method keeps waiting.
when I use taskInfo, err := task.WaitForResult(ctx) in TaskWaitForResult method I see that it creates a new PropertyCollector but while creating a filter for the property collector it is not able to find the property collector created as part of task.WaitForResult and gives the following error:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>The object 'vmodl.query.PropertyCollector:session[523d1a0a-9c22-8da5-c65c-127085550672]52bb34e0-1c4d-55ad-9269-593bab656a07' has already been deleted or has not been completely created</faultstring><detail><ManagedObjectNotFoundFault xmlns="urn:vim25" xsi:type="ManagedObjectNotFound"><obj type="PropertyCollector">session[523d1a0a-9c22-8da5-c65c-127085550672]52bb34e0-1c4d-55ad-9269-593bab656a07</obj></ManagedObjectNotFoundFault></detail></soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
Please help me understand what should I do to solve these issues?
The text was updated successfully, but these errors were encountered:
Discussed in #3648
Originally posted by bharadwaj-reddy-22 December 11, 2024
My code snippets.
This error is related to
vm is a object.VirtualMachine that I get through SOAP request to ESXI Host.
v is a VMwareClient which has govmomi.GovInterface which I use to make Govmomi SOAP requests.
off, err := vm.PowerOff(v.ctx) if err != nil { return err } return v.TaskWaitForResult(v.ctx, off)
when I use
taskInfo, err := task.WaitForResultEx(ctx)
in TaskWaitForResult method I see that the task is completed from the UI of ESXI host but the WaitForResultEx keeps waiting for a response to this request<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><WaitForUpdatesEx xmlns="urn:vim25"><_this type="PropertyCollector">ha-property-collector</_this></WaitForUpdatesEx></Body></Envelope>
for 10 mins.My assumption is the task gets completed before the SOAP request for WaitForUpdateEx lands on the host and as task is completed no updates are returned and the method keeps waiting.
when I use
taskInfo, err := task.WaitForResult(ctx)
in TaskWaitForResult method I see that it creates a new PropertyCollector but while creating a filter for the property collector it is not able to find the property collector created as part of task.WaitForResult and gives the following error:<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>The object 'vmodl.query.PropertyCollector:session[523d1a0a-9c22-8da5-c65c-127085550672]52bb34e0-1c4d-55ad-9269-593bab656a07' has already been deleted or has not been completely created</faultstring><detail><ManagedObjectNotFoundFault xmlns="urn:vim25" xsi:type="ManagedObjectNotFound"><obj type="PropertyCollector">session[523d1a0a-9c22-8da5-c65c-127085550672]52bb34e0-1c4d-55ad-9269-593bab656a07</obj></ManagedObjectNotFoundFault></detail></soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
Please help me understand what should I do to solve these issues?
The text was updated successfully, but these errors were encountered: