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

    Detached VM Snapshots after Warm Migration

    Scheduled Pinned Locked Moved Backup
    26 Posts 4 Posters 189 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.
    • DustyArmstrongD Offline
      DustyArmstrong @acebmxer
      last edited by

      @acebmxer My container is built from the sources, only fairly recently. I may try rebuilding it with the latest commit and deploy completely new, if that would work. I'm just trying to avoid a situation where I end up with even more confusion in the database.

      In the end, my ultimate goal is just to re-associate the VMs with XO and the wider XAPI database. Whatever method will achieve that should work here as I'm starting from scratch anyway - for the most part. Whatever way achieves that cleanly really, I'm just a bit unsure how best to do it as moving XO clearly caused me issues, need to understand how to rebuild the VM associations.

      DustyArmstrongD 1 Reply Last reply Reply Quote 0
      • DustyArmstrongD Offline
        DustyArmstrong @DustyArmstrong
        last edited by DustyArmstrong

        Looks like I unfortunately blew my chance to do this cleanly.

        Decided to plug in my old hosts again, just to see if XO felt the VM - despite being on a new host - was still associated with or on the old host. Turns out that was the right assumption, as when I snapshotted a problem VM, it did not have the health warning. Took that to mean if I removed the old VMs, the references would go with it, but alas, I should've snapshotted all of them before doing that.

        Back to square 1, but now the one VM I did snapshot no longer has the health warning. Completely wiped XO, still getting the same problem. Kind of at a loss now.

        I would still really appreciate any assistance.

        DustyArmstrongD P 2 Replies Last reply Reply Quote 0
        • DustyArmstrongD Offline
          DustyArmstrong @DustyArmstrong
          last edited by

          Well, scratch the help, I have fixed it.

          Bad VM:

          xe vm-param-list uuid={uuid} | grep "other-config"

          other-config (MRW): xo:backup:schedule: one-time; xo:backup:vm: {uuid}; xo:backup:datetime: 20260214T18:13:03Z; xo:backup:job: 97665b6d-1aff-43ba-8afb-11c7455c16ff; xo:backup:sr: {uuid}; auto_poweron: true; base_template_name: Debian Buster 10; [...]

          Clean VM:

          other-config (MRW): auto_poweron: true; base_template_name: Debian Buster 10; [...]

          Stale references to my old backup job causing the VM to disassociate with the VDI chain. Removing the extra config resolved it. Simple when you know where to look.

          xe vm-param-remove uuid={uuid} param-name=other-config param-key=xo:backup:job
          xe vm-param-remove uuid={uuid}  param-name=other-config param-key=xo:backup:sr
          xe vm-param-remove uuid={uuid}  param-name=other-config param-key=xo:backup:vm
          xe vm-param-remove uuid={uuid}  param-name=other-config param-key=xo:backup:schedule
          xe vm-param-remove uuid={uuid}  param-name=other-config param-key=xo:backup:datetime
          

          VMs now snapshot clean.

          1 Reply Last reply Reply Quote 1
          • P Offline
            Pilow @DustyArmstrong
            last edited by

            @DustyArmstrong I have hard times to understand how the VM is aware of the XOA it is/was attached to...

            a VM resides on a host
            a Host in in a pool
            a Pool is attached to a (or many) XO/XOA

            how the hell your VM is aware of its previous XO ? 😕

            P florentF 2 Replies Last reply Reply Quote 0
            • P Offline
              Pilow @Pilow
              last edited by

              lol your previous post answered my questions. other-config.

              DustyArmstrongD 1 Reply Last reply Reply Quote 0
              • DustyArmstrongD Offline
                DustyArmstrong @Pilow
                last edited by

                @Pilow Time for a drink, I think.

                1 Reply Last reply Reply Quote 1
                • florentF Offline
                  florent Vates 🪐 XO Team
                  last edited by

                  nice catch
                  you now know the internal magic of the xo backup .

                  DustyArmstrongD 1 Reply Last reply Reply Quote 0
                  • florentF Offline
                    florent Vates 🪐 XO Team @Pilow
                    last edited by florent

                    @Pilow said in Detached VM Snapshots after Warm Migration:

                    @DustyArmstrong I have hard times to understand how the VM is aware of the XOA it is/was attached to...

                    a VM resides on a host
                    a Host in in a pool
                    a Pool is attached to a (or many) XO/XOA

                    how the hell your VM is aware of its previous XO ? 😕

                    • a running vm has a property resident_on exposed by xapi
                    • the queries from pools are handled separatly, thus we can decorate all the object of a xapi with a $pool property
                    • this is the server collection that track which server data we know, and which one are connected or not

                    Mots of the data lives in the xapi, that means that multiple XO can handle multiple pools. The exception are the SDN Controller ( best handled by only one XO) and the backups of the same VM.

                    1 Reply Last reply Reply Quote 0
                    • DustyArmstrongD Offline
                      DustyArmstrong @florent
                      last edited by

                      @florent Thanks, had to put the DFIR hat on.

                      May as well ask as I thought about a PR for this - would it be feasible/practical/desirable to allow this to be done from XO's UI? I don't know how much of an edge case this was for me, but being able to remove "other-config" data following a migration (e.g. you do what I did and want the VMs to start over independently on a new host) might be beneficial to others.

                      Obviously it would be quite destructive I imagine, if used inappropriately. Even just reporting those ghostly associations would be nice - again not sure of your overall design ethos so there may be good reasons why it's not a solid idea.

                      1 Reply Last reply Reply Quote 0
                      • florentF Offline
                        florent Vates 🪐 XO Team
                        last edited by

                        I think at least showing them could be a good idea. this is planned ( but low priority)

                        DustyArmstrongD 1 Reply Last reply Reply Quote 0
                        • DustyArmstrongD Offline
                          DustyArmstrong @florent
                          last edited by

                          @florent I'd be interested in giving it a shot if you accept PRs, but if you already have it planned and would rather do it yourselves at a later date (and it's too low a priority to review a PR anyway) then that's fair enough. I'll be content enough knowing it's a thing to be aware of under the hood.

                          florentF 1 Reply Last reply Reply Quote 0
                          • florentF Offline
                            florent Vates 🪐 XO Team @DustyArmstrong
                            last edited by florent

                            @DustyArmstrong I think we won't do too much on XO5 for now, and for xo6 we are trying to do everything with a UX designer to ensure coherence, at least until we have a full working app

                            DustyArmstrongD 1 Reply Last reply Reply Quote 0
                            • DustyArmstrongD Offline
                              DustyArmstrong @florent
                              last edited by

                              @florent No problem, just thought it would be fun.

                              Thanks for your work anyway!

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