Proxmox api, stop running task

Melanxolik

Well-Known Member
Dec 18, 2013
86
0
46
Hello all, I have small problem with proxmox again.

I started from gui or console run task and got task id:
INFO: started backup task '94fdd0a3-28b5-4078-b9d9-06d098ec1a36'

but, I want to stop run this task from proxmox api, I tried search this in pvesh and didn't find.


Looked to api http://pve.proxmox.com/pve2-api-doc/ and see:
Code:
pvesh delete /nodes/{node}/tasks/{upid}

How can I compare taskid and upid for stop do task?
 
thanks, it's working, but I have other question about api

How can I get current running task connected with vmid?
In [8]: proxmox.nodes("virt01").tasks().get(vmid=231)
this query show me only complete task, but I want show running task for this vmid

It's need for control duplicate the tasks in shared queue to create backups.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!