XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Pre-Freeze-/Post-Thaw-Script with xe-guest-utilities

    Scheduled Pinned Locked Moved Development
    9 Posts 4 Posters 757 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      KPS Top contributor
      last edited by

      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.100009553

      Best wishes
      KPS

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi,

        1. 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)
        2. 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
        K 1 Reply Last reply Reply Quote 0
        • K Offline
          KPS Top contributor @olivierlambert
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            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 🙂

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              KPS Top contributor @olivierlambert
              last edited by

              @olivierlambert
              Sounds great. I would be very happy to see this on Linux and Windows.
              Thank you for your effort!

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                It's a big effort indeed, this is costing a lot of money 😅

                1 Reply Last reply Reply Quote 1
                • R Offline
                  rjt
                  last edited by

                  @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 🙂

                  Specification

                  XO will waits for the request to be answered before starting the snapshot, but will not wait longer than 1 minute.

                  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-fJ 1 Reply Last reply Reply Quote 0
                  • olivierlambertO Offline
                    olivierlambert Vates 🪐 Co-Founder CEO
                    last edited by

                    @julien-f can answer that question

                    1 Reply Last reply Reply Quote 0
                    • julien-fJ Offline
                      julien-f Vates 🪐 Co-Founder XO Team @rjt
                      last edited by

                      @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
                      
                      1 Reply Last reply Reply Quote 2
                      • First post
                        Last post