PVE API : wait for lock before action ?

Florent

Member
Apr 3, 2012
91
2
8
Hi all,

I'm working with PVE API to move VMs from one storage to another (BTW, online moving does not work, I have to stop & start VM).

And I would like to send command to API, and to set this command waiting for previous to finish (wait for lock).
For example, start VM after disk migration is done.

Is that possible ? Of course I can do it application side, but is API able to do that ?

Thank you.
 
, but is API able to do that ?

There is only a experimental API to execute multiple command:

# pvesh help /nodes/localhost/execute -v
help [path] [--verbose]
cd [path]
ls [path]

USAGE: create /nodes/{node}/execute -commands <string> [OPTIONS]

Execute multiple commands in order.

-commands string

JSON encoded array of commands.
 

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!