reubenur-rahman / vmware-pyvmomi-examples

The example codes are written using the VMware official python library pyvmomi
Apache License 2.0
89 stars 60 forks source link

queued state in "wait_for_task" #4

Open nryc opened 8 years ago

nryc commented 8 years ago

Hello,

In your function "wait_for_task" in "cold_migration_without_vmotion.py", you are waiting until the task is not "running" anymore but before that the task can be in the "queued" state. If so, your function doesn't wait!

This is what I did to fix it:

while task.info.state == vim.TaskInfo.State.running or task.info.state == vim.TaskInfo.State.queued:

Have a nice day,