PVE API : wait for lock before action ?

Florent

Member
Apr 3, 2012
91
4
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.