[pve-devel] [PATCH qemu-server v3 0/4] add reboot api

Dominik Csapak d.csapak at proxmox.com
Fri Sep 6 14:24:04 CEST 2019


this adds a reboot api call for vms, which uses a reboot trigger file
that gets detected by the qm cleanup call to start the vm again

this api call is useful when users want to apply pending hardware changes
without waiting for the vm to shutdown

changes from v2:
* reordered patches (index links are now 1/4)
* refactored vm_stop and introduced vm_reboot for better function signatures
* renamed to clear/create_reboot_request
* improved clearing error handling

changes from rfc:
* move the creation/deletion into their own subs
* only create reboot trigger while having the lock during shutdown
* cleanup the trigger on vm startup
* use always vm_stop even for ha vms, since we do not want to change
  the target state


Dominik Csapak (4):
  api: add missing index child links
  add create and remove reboot trigger subs
  qm: cleanup: detect and handle reboot trigger
  api: add reboot api call

 PVE/API2/Qemu.pm  |  63 +++++++++++++++
 PVE/CLI/qm.pm     |  16 ++++
 PVE/QemuServer.pm | 190 +++++++++++++++++++++++++++++-----------------
 3 files changed, 198 insertions(+), 71 deletions(-)

-- 
2.20.1





More information about the pve-devel mailing list