Freeze/Thaw Scripts

I believe what your looking for is a guest-agent specific hook.


So assuming you have the guest agent correctly installed inside the VM, (without it freeze/thaw actions will anyway not work):

So when fs-freeze is executed the default script at /etc/qemu/fsfreeze-hook is the one executed.

However I believe you can also add a script to the default one, so that it is also executed upon fs-freeze.
You can do this by adding other scripts to the directory of /etc/qemu/fsfreeze-hook.d so that they will also be activated (together).

The same should hold true for /etc/qemu/fsthaw-hook & directory of /etc/qemu/fsthaw-hook.d

Disclaimer: Never tried!


Edit: See this comment on forum post
 
  • Like
Reactions: leesteken