[ovirt-users] async vm start (python)

Giulio Casella giulio at di.unimi.it
Tue Oct 14 11:04:37 UTC 2014


Hi everybody,
I'm trying to start a VM (using python sdk) asynchronously, but I obtain 
synchronous behaviour.
The engine is RHEV-M version 3.4.1-0.31.el6ev.
Here a snippet of code:

---------------------------------------------------------
myvm = api.vms.get(name="VMNAME")
retval = myvm.start(params.Action(async=True))
print ParseHelper.toXml(retval)
---------------------------------------------------------

and this is what I get (retval):

---------------------------------------------------------
<action>
     <async>true</async>
     <vm href="/api/vms/5aa66e96-5fdd-4562-9c7d-ae6f88e6805d" 
id="5aa66e96-5fdd-4562-9c7d-ae6f88e6805d">
[...cut..]
     </vm>
     <job href="/api/jobs/5c2326c7-f25c-432f-8848-c94e80dd173b" 
id="5c2326c7-f25c-432f-8848-c94e80dd173b"/>
     <status>
         <state>complete</state>
     </status>
</action>
---------------------------------------------------------

status of task is always "complete" and the operation take some time, 
few seconds to some tens of seconds (sync behaviour).

Any ideas?

Thanks in advance,
Giulio




More information about the Users mailing list