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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.