> > 1.) qmp: savevm-start [statefile] > > > > This save the VM state into [statefile] and then stops the VM. > > That's migrate exec:cat>statefile (or similar)
Basic functionality is the same, but we support saving state to block devices. But there are many migration related patches in the last months, so I decide to not touch that code for now, and write my own. But yes, in future, we can try to merge things. > > 2.) qga freezefs > > How can freezefs run while the VM is stopped? Oh, good point ;-) So we need to call that inside savevm-start > > 3.) create snapshots: either using external tools or by qmp: > > snapshot-drive > > > > 4.) gqa unfreezefs > > Same as above, this should be done after step (5). yes > > 5.) qmp: savevm-end > > > > This restarts/resumes the VM > > That's simply "cont". Yes - the plan was to do extra checks here. If it is not needed, we can remove it later. I also want to avoid that a user can resume a VM which was suspended for taking snapshots, but I am not sure how to do that.