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.
    • M Offline
      Meth0d
      last edited by

      I was trying to take a Snapshot from my XOA (Source) VM before updating it but aparently i cant:

      vm.snapshot
      {
        "id": "4ac34777-312e-cb6e-67a0-ccc34a71f8e1"
      }
      {
        "code": "UNIMPLEMENTED_IN_SM_BACKEND",
        "params": [
          "OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07"
        ],
        "task": {
          "uuid": "a24d6e0f-04cf-039d-b0bb-6a53589f9874",
          "name_label": "Async.VM.snapshot",
          "name_description": "",
          "allowed_operations": [],
          "current_operations": {},
          "created": "20230331T07:07:23Z",
          "finished": "20230331T07:07:24Z",
          "status": "failure",
          "resident_on": "OpaqueRef:7a2e10b8-677f-4c65-95cd-b8393884450b",
          "progress": 1,
          "type": "<none/>",
          "result": "",
          "error_info": [
            "UNIMPLEMENTED_IN_SM_BACKEND",
            "OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07"
          ],
          "other_config": {},
          "subtask_of": "OpaqueRef:NULL",
          "subtasks": [
            "OpaqueRef:b2436483-c1ee-447c-8016-636a52c61528"
          ],
          "backtrace": "(((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 80))((process xapi)(filename list.ml)(line 110))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 122))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 130))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 171))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 209))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 220))((process xapi)(filename list.ml)(line 121))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 222))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 442))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process xapi)(filename ocaml/xapi/xapi_vm_snapshot.ml)(line 33))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 131))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename ocaml/xapi/rbac.ml)(line 233))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 104)))"
        },
        "message": "UNIMPLEMENTED_IN_SM_BACKEND(OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07)",
        "name": "XapiError",
        "stack": "XapiError: UNIMPLEMENTED_IN_SM_BACKEND(OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07)
          at Function.wrap (/opt/xen-orchestra/packages/xen-api/src/_XapiError.js:16:12)
          at _default (/opt/xen-orchestra/packages/xen-api/src/_getTaskResult.js:11:29)
          at Xapi._addRecordToCache (/opt/xen-orchestra/packages/xen-api/src/index.js:984:37)
          at forEach (/opt/xen-orchestra/packages/xen-api/src/index.js:1018:14)
          at Array.forEach (<anonymous>)
          at Xapi._processEvents (/opt/xen-orchestra/packages/xen-api/src/index.js:1008:12)
          at Xapi._watchEvents (/opt/xen-orchestra/packages/xen-api/src/index.js:1181:14)
          at runNextTicks (node:internal/process/task_queues:60:5)
          at processImmediate (node:internal/timers:447:9)
          at process.callbackTrampoline (node:internal/async_hooks:130:17)"
      }
      

      Every other VM on that host i can snapshot just fine.
      I even tried shutting it down and then taking a snapshot with the same result.
      8.2.1 Host is Up2Date

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

        What kind of storage your XO VM (not XOA if it's from the source) is running?

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          Meth0d @olivierlambert
          last edited by

          @olivierlambert
          Its running on a Local attached 8TB Disk thats also used to Store the Backups

          6ddd3489-6d23-4b9e-a5bc-99d815fde884-image.png

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

            And how one would snapshot a physical disk? 🤔

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              Meth0d @olivierlambert
              last edited by

              @olivierlambert Well its virtual disk is located on a local attached 8TB Disk .....

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

                I suppose the xoa backup hdd is a raw virtual drive, isn't it?

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  Meth0d @olivierlambert
                  last edited by

                  @olivierlambert Yes i think it is, if i remember correct that was the only way to add +4TB drives ?
                  I just tested to do a snapshot from another VM on that disk, that works.

                  74a8c403-3a06-4b8a-8963-6f927736f64c-image.png

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

                    Yes, because on your other VMs, you aren't using a raw VDI 😉 RAW doesn't support snapshots, as explained in our doc: https://docs.xcp-ng.org/storage/#using-raw-format

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      Meth0d @olivierlambert
                      last edited by

                      @olivierlambert Okay but obviously i can create snapshots on the RAW SR (here OPensense in the screenshot above). So this is a should but bould sometiomes does work situation ?-)

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

                        Are you sure? It seems you did a snapshot on non-raw VM disk, which is OK. If you do a VM.snapshot, it will individually snapshot ALL the VM disk, including the raw ones. And this is when it breaks.

                        I would be very happy to get snapshots on raw drives, but it's not physically possible with SMAPIv1.

                        M 1 Reply Last reply Reply Quote 0
                        • M Offline
                          Meth0d @olivierlambert
                          last edited by

                          @olivierlambert maybe i missunderstood things, the RAW Disk from my XO VM is the 7TB data disk "[NOBAK] xoa_backup_hdd".
                          The system disk is "xoa_sda" is not RAW.

                          So i thought excluding the disk with "[NOBAK]" would make me able to snapshot the VM (system disk). So whenever you have attached a RAW device makes you unable to snapshot the VM.

                          Detaching it, taking a snapshot and reattaching it would work however?

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

                            • On XCP-ng 8.2: [NOBAK] will be only used by Xen Orchestra to NOT export the snapshot generated by VM.snapshot method.
                            • On XCP-ng 8.3: [NOBAK] will be used by XO to exclude the disk from the VM.snaphot call during an XO backup (since we added that feature in XAPI ourselves)

                            In any case, a manual snapshot will snap all the drives.

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              Momi_V
                              last edited by

                              You can do this on the cli (in 8.3) via

                              xe vm-snapshot new-name-label=newname uuid=vmUUID ignore-vdi-uuids=uuid1,uuid2,uuid3
                              

                              It is currently not possible in Xen-Orchestra, see
                              https://xcp-ng.org/forum/topic/3607/snapshot-backup-exclude-additional-mounted-disk/8?_=1680267126156

                              M 1 Reply Last reply Reply Quote 1
                              • M Offline
                                Meth0d @Momi_V
                                last edited by

                                Thanks for the heads up. A [NOSNAP] Feature sounds like a good idea though 🙂

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

                                  We have to discuss this internally with @julien-f 🙂

                                  julien-fJ 1 Reply Last reply Reply Quote 0
                                  • planedropP Offline
                                    planedrop Top contributor
                                    last edited by

                                    FYI just for future things, a generally better way to make greater than 2TiB disks is to simply span them within the guest OS, so basically for 7TiB just make like 4 2TiB VHD's and then have the VM OS span those disks so they appear as a single disk within the VM.

                                    I do this all the time, works super well and gives you the ability to still snapshot them, etc....

                                    M 1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      Meth0d @planedrop
                                      last edited by

                                      @planedrop are you using LVM for that or how are u doing that? I never bothered with the problem because i dont have enough local space for 8TB disk snapshots anyways.

                                      planedropP 1 Reply Last reply Reply Quote 0
                                      • planedropP Offline
                                        planedrop Top contributor @Meth0d
                                        last edited by

                                        @Meth0d Format wise I am using EXT so it's thin provisioned, and since it's all thin provisioned, snapshots only take up the space of the changes to the disk, so you don't really need enough space for 8TB snapshots.

                                        As for LVM, you mean in the VMs to manage spanning? So far I've only really had a need to go beyond 2TiB for Windows VMs so I'm just using NTFS with Windows Disk Manager for those spans. But I imagine you could do it with LVM in Linux, not sure if there are better options for it.

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