Question

REST API and vm guest shutdown


Hi
I was wandering if there is a way to command a guest_shutdown to a vm.
In v2 there is path /vms/{uuid}/set_power_state/ but the expected values are 'ON', 'OFF', 'POWERCYCLE', 'RESET', 'PAUSE', 'SUSPEND', 'RESUME', 'ACPI_SHUTDOWN', 'ACPI_REBOOT'.
So, no shutdown

In v3, that should be the new one to use, /vms/{uuid}/set_power_state/ has disappeared!
I guess the only way is to use GET /vms/{uuid}, just change the power_state prop , and update using PUT /vms/{uuid}. (I see it risky)

Anyway, no guest shutdown: am I missing something?
Thanks
Lo


0 replies

Be the first to reply!

Reply