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

    XO cant Snapshot itself ?

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    35 Posts 7 Posters 3.6k Views 7 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.
    • julien-fJ Offline
      julien-f Vates πŸͺ Co-Founder XO Team @olivierlambert
      last edited by

      @olivierlambert Does [NOSNAP] implies [NOBAK]?

      If not, should we ignore [NOSNAP] when a snapshot is required to backup the VM?

      1 Reply Last reply Reply Quote 1
      • olivierlambertO Offline
        olivierlambert Vates πŸͺ Co-Founder CEO
        last edited by

        That's a good question and an important choice to make πŸ€”

        IMHO, the principle of least surprise would tell to ignore [NOSNAP] during a backup. Because I'm afraid people would backup a VM with [NOSNAP] and expect it to be saved. That would be a bad surprise if not. What do you think?

        julien-fJ 1 Reply Last reply Reply Quote 0
        • julien-fJ Offline
          julien-f Vates πŸͺ Co-Founder XO Team @olivierlambert
          last edited by

          @olivierlambert I think that [NOSNAP] means that this VDI should not be snapshotted and that ignoring it during backup would be surprising.

          But your point is valid too, I have no ideal solution, hence my question ^^

          julien-fJ 1 Reply Last reply Reply Quote 0
          • julien-fJ Offline
            julien-f Vates πŸͺ Co-Founder XO Team @julien-f
            last edited by

            I don't see a case where one would want [NOSNAP] but not [NOBAK]. Maybe we could require either none or both of them during a backup and not support one without the other?

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates πŸͺ Co-Founder CEO
              last edited by olivierlambert

              The situation I can have in mind:

              • you want your VM to be backup
              • when you do a manual snapshot, you don't want to snap a disk

              But why doing this? I don't know, it's hard to predict the need for this… At least, if we choose to NOT doing a backup of this disk with NOSNAP, we MUST tell that clearly in the doc.

              1 Reply Last reply Reply Quote 0
              • W Offline
                wilsonqanda
                last edited by wilsonqanda

                @julien-f @olivierlambert
                Was there a resolution on the [NOSNAP] feature just much convenient than going to the CMD each time πŸ™‚ ?

                In the meantime will be using snippet below so low priority for me:

                xe vm-snapshot new-name-label=newname uuid=vmUUID ignore-vdi-uuids=uuid1,uuid2,uuid3
                
                1 Reply Last reply Reply Quote 0
                • olivierlambertO Offline
                  olivierlambert Vates πŸͺ Co-Founder CEO
                  last edited by

                  You mean [NOBAK]?

                  W 1 Reply Last reply Reply Quote 0
                  • W Offline
                    wilsonqanda @olivierlambert
                    last edited by wilsonqanda

                    @olivierlambert Thanks for the quick reply. [NOBAK] works for backup by ignoring VDI with [NOBAK] in its name, but when running manual snapshot like stated above the [NOBAK] still show up in the SR meaning it made a copy of the [NOBACK].

                    Ideally with [NOBAK] it should not take snapshot or backup right or am i understanding it incorrectly? Does this only apply to automated BACKUP & SNAPSHOT only?
                    94bcd9f6-3051-46f1-91c8-729e4f289d43-image.png

                    1 Reply Last reply Reply Quote 0
                    • GheppyG Offline
                      Gheppy
                      last edited by Gheppy

                      From my point of view, it should be with "OR" and if the condition is fulfilled to execute.
                      E.g :

                      • if I have "[NOSNAP] 'VM name' " not to execute snapshoot
                      • if I have "[NOBAK] 'Vm name' " not to execute backup
                      • if I have "[NOSNAP] [NOBAK] 'Vm name' " not to execute snapshot and backup
                        But if you make a backup, remove only what is with [NOBAK]
                      1 Reply Last reply Reply Quote 0
                      • olivierlambertO Offline
                        olivierlambert Vates πŸͺ Co-Founder CEO
                        last edited by

                        Opinion @julien-f ?

                        julien-fJ 1 Reply Last reply Reply Quote 0
                        • GheppyG Offline
                          Gheppy
                          last edited by

                          This is what I was thinking

                          • [NOSNAP] to be like SDA and disk 3
                          • [NOBAK] to be with SDA and disk 2
                          • In both cases disk 4 is excluded

                          66a42055-8a10-4b46-a203-0dd3da2e9b54-image.png

                          W 1 Reply Last reply Reply Quote 1
                          • W Offline
                            wilsonqanda @Gheppy
                            last edited by wilsonqanda

                            @Gheppy Wow great illustration πŸ™‚ i think this is perfect but only if it is feasible to implement it now...

                            FYI as a side note I notice that when I do ignore-vdi-uuids=uuid1,uuid2,uuid3 I notice that when I reload snapshots of the VM the ignore vdi(s) disappear in the Disks section. Which makes logical sense as those ignore-vdi-uuids are not part off the list that are snapshotted. But it's a bit of an inconvenient to add VDI back in as those vdi should still be part of the disk just not part of the snapshots. But otherwise it works great.

                            To snapshot do the following to ignore certain vdi(s):

                            xe vm-snapshot new-name-label="newname_YYYY-MM-DDTHH:MM:SS.sssZ" uuid=vmUUID ignore-vdi-uuids=uuid1
                            

                            where uuid1=[NOSNAP] TESTING
                            e9a2aa43-a1ce-4616-99df-bdaada587151-image.png

                            Once reload the [NOSNAP] disappear:
                            74a25d27-1b2e-4968-844c-799ab2dc1742-image.png

                            Beside that this is the best workaround for now and this little inconvenience is not a big deal. But in case someone need to understand it hopefully I added enough detail to clarify this content for future readers.

                            1 Reply Last reply Reply Quote 0
                            • julien-fJ Offline
                              julien-f Vates πŸͺ Co-Founder XO Team @olivierlambert
                              last edited by

                              @olivierlambert Completely separate [NOSNAP] (for non-backup snapshots) and [NOBAK] (for backups) would be fine by me.

                              julien-fJ 1 Reply Last reply Reply Quote 1
                              • julien-fJ Offline
                                julien-f Vates πŸͺ Co-Founder XO Team @julien-f
                                last edited by

                                It's implemented: https://github.com/vatesfr/xen-orchestra/commit/dcf6885dfaec000e93e4630307fe9d2d7fd66232

                                Thanks everyone for your feedback.

                                0 julien-f committed to vatesfr/xen-orchestra
                                feat(xo-server): support `[NOSNAP]` tag on disks
                                
                                Fixes https://xcp-ng.org/forum/post/79179
                                W 1 Reply Last reply Reply Quote 1
                                • W Offline
                                  wilsonqanda @julien-f
                                  last edited by wilsonqanda

                                  @julien-f Thanks a lot Julien. So this going to be implemented in next release?

                                  So when I run [NOSNAP] it will ignore these VDI with [NOSNAP] at the beginning of the name but just wondering when loading from the snapshot those [NOSNAP] vdi won't be loaded so i just have to add them in to the disk tab so it can be boot back up like normal correct? This is the default case currently when running snippet below.

                                  xe vm-snapshot new-name-label="newname_YYYY-MM-DDTHH:MM:SS.sssZ" uuid=vmUUID ignore-vdi-uuids=uuid1
                                  
                                  julien-fJ 1 Reply Last reply Reply Quote 0
                                  • julien-fJ Offline
                                    julien-f Vates πŸͺ Co-Founder XO Team @wilsonqanda
                                    last edited by

                                    @wilsonqanda Exactly, under the hood that's precisely what XO is doing, it's calling VM.snapshot with the ignore_vdis param.

                                    W 1 Reply Last reply Reply Quote 1
                                    • W Offline
                                      wilsonqanda @julien-f
                                      last edited by

                                      @julien-f Thanks a lot for this update!

                                      1 Reply Last reply Reply Quote 0
                                      • olivierlambertO olivierlambert marked this topic as a question on
                                      • olivierlambertO olivierlambert has marked this topic as solved on
                                      • First post
                                        Last post