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

    VDI export of running VM

    Scheduled Pinned Locked Moved XCP-ng
    7 Posts 3 Posters 872 Views 3 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.
    • H Offline
      hexplor
      last edited by

      What happens when I use xe vdi-export on a disk that is attached to a running VM? Does it create a shadow copy to do the export?

      I'm sure I need to shutdown the VM to do xe vdi-import but being able to export live could be very useful.

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

        Hi,

        An export of a live VM is always while using a snapshot. That's how XO is doing backup of a running infrastructure.

        You simply can't copy a VDI that is actually used by a VM, because blocks are moving. How could you be sure to copy the entire correct blocks without doing a snapshot? It's simply not possible 🙂

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          hexplor @olivierlambert
          last edited by

          @olivierlambert

          Thanks for the reply.

          I'm still not sure about the process. Does it copy a "snapshot-in-time" version? In other words, if I run xe vdi-export am getting a copy of whatever was there, at that moment?

          I understand that there are serious problems in trying to copy anything that is "live". For example, FSArchiver can be forced to copy a live system and while it does this safely, there may be inconsistencies in the data.

          1 Reply Last reply Reply Quote 0
          • DanpD Online
            Danp Pro Support Team
            last edited by

            I suspect that you would need to create a new snapshot using xe and then use the snapshot as the source of the export instead of the running VM. Have you looked into using XO's REST API for this instead of xe?

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

              The VM is aware of being snapshoted, so it's not an issue. Can you explain what do you want to achieve in the end? That would be helpful to assist 🙂

              H 1 Reply Last reply Reply Quote 0
              • H Offline
                hexplor @olivierlambert
                last edited by

                Thanks for the replies! Sorry, I lost track of this thread.

                @olivierlambert said in VDI export of running VM:

                The VM is aware of being snapshoted, so it's not an issue. Can you explain what do you want to achieve in the end? That would be helpful to assist 🙂

                I'm trying to find a way to script VM backups.

                One complication is that at least one VM has a data drive that is too big for regular backups. So, I wonder if there's way to work around that.

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

                  Yes, you can use XO webhooks (IIRC) to trigger something before or after a backup and send the request to a custom agent you made inside the VM.

                  But I'm not sure to get it, can you provide what do you want to achieve, not the technical solution (script VM backup is already a solution, not the problem you are trying to solve)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post