RHEV: Is it possible to retrieve the status of a task created with -Async using the task ID in Powershell API?

Solution Unverified - Updated -

Issue

  • With poweshell API, asynchronous calls are used for some tasks that take a lot of time (e.g. creating a preallocated disk).

  • A call with -Async returns immediately, and the user of the API must poll back periodically to see what the status of the command is. Polling the status of a task is done with Get-TasksStatus cmdlet. Get-TasksStatus only accepts a RhevmCMd.CLITask object  (-CommandTaskIdList). This works fine in the session where the -Async call was executed, because there we get the CLITask object via Get-LastCommandTasks. There appears to be no solution however for checking the status from another session.

  • Is it possible to use -TaskID switch to to Get-TaskStatus command to overcome this limitation?

Environment

  • Red Hat Enterprise Virtualization v2.2
  • PowerShell API

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content