[pve-devel] [PATCH qemu-server v2 0/6] implement suspend to disk

Dominik Csapak d.csapak at proxmox.com
Wed Mar 13 09:54:58 CET 2019


implement suspend to disk for vms

the idea is the following:

add a 'suspend' lock
halt execution of the vm
save the vmstate to a file/disk/etc.
hard poweroff the vm (qmp quit)

on the next start check for 'suspend' lock
resume from saved state

the lock prevents any changes to the vm that would prevent a resume
(config change, migration, etc)

changes from v1:
* rename variable s/stat/state/
* abort if vm is locked with 'backup' lock
* remove the lock on error
* include date into state file name and make the parameters more explicit
* pull out multiple uses of has_lock
* add patch for explicitly giving the target storage for the state

Dominik Csapak (6):
  move code of save_vmstate preparation
  correct comment about size
  implement suspend to disk for running vms
  resume suspended vm on start
  add ability to suspend a vm to disk from the api
  add statestorage parameter to suspend API

 PVE/API2/Qemu.pm  |  18 +++++++-
 PVE/QemuConfig.pm |  30 +-------------
 PVE/QemuServer.pm | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 136 insertions(+), 34 deletions(-)

-- 
2.11.0




More information about the pve-devel mailing list