Pre-Freeze-/Post-Thaw-Script with xe-guest-utilities
-
Hi!
As quiesced snapshots are deprecated and RAM-enabled backups require some downtime:
What do you think about the concept of "Pre-Freeze"-scripts through xe-guest-utilities? Would it be possible to have some scripts on the snapshotted system, that are getting executed, when a snapshot is taken?
Example for VMWare:
https://www.veritas.com/support/en_US/article.100009553Best wishes
KPS -
Hi,
- If you have PV drivers installed in your guests, a snapshot should be coherent anyway (I can at least tell you that's the case on Linux)
- There's already a feature we started in XO, see https://xen-orchestra.com/blog/xen-orchestra-5-75/#-webhooks-for-snapshots-beta for use of webhooks
-
@olivierlambert
Thank your for your answer.About the options:
-
Coherent snapshot: With a pre-freeze-script, it would be 100% possible to bring every system in a consistent state.
-
Webhooks: Can do the same, but are a lot more work than a local script. Especially for windows VMs, I would have to install a webserver, that can trigger scripts.
-
-
That's why we planned to improve the tools (at least on Linux at first) to allow more things to be passed directly to it
-
@olivierlambert
Sounds great. I would be very happy to see this on Linux and Windows.
Thank you for your effort! -
It's a big effort indeed, this is costing a lot of money
-
@olivierlambert awesome!
I assume Windows VMs that get their drivers from Windows Update will not have this capability unless we install the simple service:1727.
On github, it says that the the VM service has to respond within 1 minute, but it would take several minutes to backup a database. The blog page says it will wait for answer. Sounds like Vates knows the answer is somewhere in between. We will wait, but only for so long
If the request fails for any reason, XO will go ahead with snapshot immediately.
Webhooks for snapshots [beta] says "It's now possible to notify a VM via an HTTP request before a snapshot. Xen Orchestra will wait for an answer before starting the actual snapshot."
-
@julien-f can answer that question
-
@rjt You can customize the hook timeout by adding this setting in your xo-server's config:
[xapiOptions] # Timeout in milliseconds syncHookTimeout = 300e3 # 5 minutes