Quantcast
Channel: Proxmox Support Forum
Viewing all articles
Browse latest Browse all 170613

How do you deal with asynchronous nature of proxmox API?

$
0
0
Hi.

The case: I need to create a VM from the templae - it's pretty easy. I just send a post to the `/nodes/nodename/openvz`

And after it's created I need to start it.

This is where I'm in stuck: the `/nodes/nodename/openvz/{id}/status/current` returns the status `stopped` even while the machine isn't created from the template entirely.

So what is the best way to do that?

Yep, I may send `.../status/start` in a loop and check if `.../status/current` changed from stopped to run, but it doesn't look right.

Viewing all articles
Browse latest Browse all 170613

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>