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

    Error: Can't init vhd directory without using alias

    Scheduled Pinned Locked Moved Solved Backup
    12 Posts 6 Posters 533 Views 6 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.
    • A
      abudef
      last edited by

      Hi,
      I got this error during the last backup. Any idea what could be wrong? Thanks.

      XO commit 99312

       {
            "id": "0mtxmc70v-3ew1fc28kiw",
            "start": 1789171202191,
            "status": "failure",
            "tasks": [
              {
                "id": "0mtxmc714-no836gl44qs",
                "start": 1789171202200,
                "status": "success",
                "end": 1789171233085,
                "result": {
                  "removedFiles": [],
                  "changedFiles": [],
                  "merge": false,
                  "size": 0
                },
                "message": "clean-vm"
              },
              {
                "id": "0mtxmcv1f-0b2n37nmhd1u",
                "start": 1789171233315,
                "status": "success",
                "end": 1789171236104,
                "result": "cbb23056-280d-224a-c8d7-d9f8d477fd39",
                "message": "snapshot"
              },
              {
                "id": "0mtxmcx6w-67x8mlawksw",
                "start": 1789171236104,
                "status": "failure",
                "tasks": [
                  {
                    "id": "0mtxmfj61-f15a842hptd",
                    "start": 1789171357897,
                    "status": "failure",
                    "end": 1789171385911,
                    "result": {
                      "code": "NOT_SUPPORTED",
                      "message": "Can't init vhd directory without using alias",
                      "name": "Error",
                      "stack": "Error: Can't init vhd directory without using alias\n    at RemoteVhdDisk.init (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backup-archive/dist/disks/RemoteVhdDisk.mjs:74:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async openDisposableDisk (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backup-archive/dist/disks/index.mjs:32:9)\n    at async Promise.all (index 0)\n    at async checkDisk (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/_runners/_writers/_checkDisk.mjs:5:3)\n    at async DiskConsumerVhdDirectory.write (file:///opt/xo/xo-builds/xen-orchestra-202609112300/packages/vhd-lib/disk-consumer/DiskConsumerVhdDirectory.mjs:98:7)\n    at async writeToVhdDirectory (file:///opt/xo/xo-builds/xen-orchestra-202609112300/packages/vhd-lib/disk-consumer/index.mjs:43:10)\n    at async RemoteAdapter.writeVhd (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/RemoteAdapter.mjs:487:14)\n    at async asyncEach.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:276:31)"
                    },
                    "message": "transfer"
                  }
                ],
                "end": 1789171385913,
                "result": {
                  "code": "NOT_SUPPORTED",
                  "message": "Can't init vhd directory without using alias",
                  "name": "Error",
                  "stack": "Error: Can't init vhd directory without using alias\n    at RemoteVhdDisk.init (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backup-archive/dist/disks/RemoteVhdDisk.mjs:74:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async openDisposableDisk (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backup-archive/dist/disks/index.mjs:32:9)\n    at async Promise.all (index 0)\n    at async checkDisk (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/_runners/_writers/_checkDisk.mjs:5:3)\n    at async DiskConsumerVhdDirectory.write (file:///opt/xo/xo-builds/xen-orchestra-202609112300/packages/vhd-lib/disk-consumer/DiskConsumerVhdDirectory.mjs:98:7)\n    at async writeToVhdDirectory (file:///opt/xo/xo-builds/xen-orchestra-202609112300/packages/vhd-lib/disk-consumer/index.mjs:43:10)\n    at async RemoteAdapter.writeVhd (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/RemoteAdapter.mjs:487:14)\n    at async asyncEach.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:276:31)"
                },
                "message": "export",
                "data": {
                  "id": "b9438bf1-1439-4aaf-b62f-31f3c7d3f93d",
                  "isFull": false,
                  "type": "remote"
                }
              }
            ],
            "infos": [
              {
                "message": "Transfer data using NBD"
              },
              {
                "message": "will delete snapshot data"
              },
              {
                "data": {
                  "vdiRef": "OpaqueRef:11cb87e5-ce7f-4a20-4051-a9033e0c218c"
                },
                "message": "Snapshot data has been deleted"
              }
            ],
            "end": 1789171387177,
            "result": {
              "code": "NOT_SUPPORTED",
              "message": "Can't init vhd directory without using alias",
              "name": "Error",
              "stack": "Error: Can't init vhd directory without using alias\n    at RemoteVhdDisk.init (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backup-archive/dist/disks/RemoteVhdDisk.mjs:74:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async openDisposableDisk (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backup-archive/dist/disks/index.mjs:32:9)\n    at async Promise.all (index 0)\n    at async checkDisk (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/_runners/_writers/_checkDisk.mjs:5:3)\n    at async DiskConsumerVhdDirectory.write (file:///opt/xo/xo-builds/xen-orchestra-202609112300/packages/vhd-lib/disk-consumer/DiskConsumerVhdDirectory.mjs:98:7)\n    at async writeToVhdDirectory (file:///opt/xo/xo-builds/xen-orchestra-202609112300/packages/vhd-lib/disk-consumer/index.mjs:43:10)\n    at async RemoteAdapter.writeVhd (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/RemoteAdapter.mjs:487:14)\n    at async asyncEach.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202609112300/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:276:31)"
            },
            "message": "backup VM",
            "data": {
              "id": "f855838c-1130-75fc-ae72-158fc75241ae",
              "type": "VM",
              "name_label": "WSDB01",
              "progress": 0
            }
          },
      

      NFS remote; jobs for all backup-up VMs are affected.

      poddingueP 1 Reply Last reply
      Reply Quote 1
      • A
        abudef
        last edited by

        https://xcp-ng.org/forum/topic/11875/master-commit-a3139-failing-backups

        1 Reply Last reply
        Reply Quote 0
        • poddingueP
          poddingue Vates 🪐 @abudef
          last edited by poddingue

          Thanks for pasting the whole log; that made this much easier to chase.

          Wild guess, but I think this may be a regression from PR #10124 ("replace vhd-lib calls with abstract methods"), which was squash-merged onto master as adecd7306 on 2026-09-11 at 09:42 UTC, just before your 202609112300 nightly was cut. master is still sitting at 99312eca2, with no fix (if any fix is needed, I'm out of my depth in this area) after that commit that I can find.

          Reading the code on master, the transfer step now checks the VHD it just wrote and passes that data-directory path along while the .alias.vhd doesn't exist yet; RemoteVhdDisk.init then refuses a directory path that isn't an alias. I could easily be wrong about that, though, and thread 11875 is a reminder that this same message has had more than one cause.

          If, by any chance, I've got it right, it would only affect repositories with "store backup as multiple data blocks" enabled. So does it also fail on a repository without that option?

          Rolling back to a commit from before yesterday morning should get you going again in the meantime, and it's probably worth mentioning @Team-XO-Backend so the people who own this code see it.

          And if I've made a total fool of myself with this "analysis", so be it. 🤷

          A 1 Reply Last reply
          Reply Quote 0
          • poddingueP poddingue marked this topic as a question
          • R
            robertblissitt
            last edited by

            I am seeing similar behavior, and only on my backup Remote with "Store backup as multiple data blocks" enabled. I've fallen back to a previous build from two days ago and rerunning backup now. 🙂

            1 Reply Last reply
            Reply Quote 1
            • A
              abudef
              last edited by

              In any case, rolling back XO to an older build helps, so hopefully it will be fixed soon.

              1 Reply Last reply
              Reply Quote 1
              • A
                Andrew Top contributor @poddingue
                last edited by

                @poddingue @Team-XO-Backend @pierrebrunet @florent I have the same issue in XO (delta backup to S3)... Caused by master commit adecd7306e2fa262ef77d71f83555d160f03aa03

                {
                  "data": {
                    "mode": "delta",
                    "reportWhen": "never"
                  },
                  "id": "1789353842351",
                  "jobId": "d6c0a656-62c5-4c39-a57a-f246b39f1cef",
                  "jobName": "minio-test",
                  "message": "backup",
                  "scheduleId": "bd4ef436-fd85-4f16-bf9e-71d1d0c8586f",
                  "start": 1789353842351,
                  "status": "failure",
                  "tasks": [
                    {
                      "id": "0mu0n2une-6717eycsj3k",
                      "start": 1789353844394,
                      "status": "failure",
                      "tasks": [
                        {
                          "id": "0mu0n2unj-32t56n3u8vn",
                          "start": 1789353844399,
                          "status": "success",
                          "end": 1789353844854,
                          "result": {
                            "removedFiles": [],
                            "changedFiles": [],
                            "merge": false,
                            "size": 0
                          },
                          "message": "clean-vm"
                        },
                        {
                          "id": "0mu0n2vw5-jwlf68g7htp",
                          "start": 1789353846005,
                          "status": "success",
                          "end": 1789353847486,
                          "result": "6d4454f8-5735-0581-1eba-a66021f22a50",
                          "message": "snapshot"
                        },
                        {
                          "id": "0mu0n2x1b-qze2zs5ytaq",
                          "start": 1789353847487,
                          "status": "failure",
                          "tasks": [
                            {
                              "id": "0mu0n2ylj-b5qu3cxprie",
                              "start": 1789353849511,
                              "status": "failure",
                              "end": 1789353849570,
                              "result": {
                                "code": "NOT_SUPPORTED",
                                "message": "Can't init vhd directory without using alias",
                                "name": "Error",
                                "stack": "Error: Can't init vhd directory without using alias\n    at RemoteVhdDisk.init (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backup-archive/dist/disks/RemoteVhdDisk.mjs:74:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async openDisposableDisk (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backup-archive/dist/disks/index.mjs:32:9)\n    at async Promise.all (index 0)\n    at async checkDisk (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/_runners/_writers/_checkDisk.mjs:5:3)\n    at async DiskConsumerVhdDirectory.write (file:///opt/xo/xo-builds/xen-orchestra-202609132201/packages/vhd-lib/disk-consumer/DiskConsumerVhdDirectory.mjs:98:7)\n    at async writeToVhdDirectory (file:///opt/xo/xo-builds/xen-orchestra-202609132201/packages/vhd-lib/disk-consumer/index.mjs:43:10)\n    at async RemoteAdapter.writeVhd (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/RemoteAdapter.mjs:487:14)\n    at async asyncEach.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:276:31)"
                              },
                              "message": "transfer"
                            }
                          ],
                          "end": 1789353849570,
                          "result": {
                            "code": "NOT_SUPPORTED",
                            "message": "Can't init vhd directory without using alias",
                            "name": "Error",
                            "stack": "Error: Can't init vhd directory without using alias\n    at RemoteVhdDisk.init (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backup-archive/dist/disks/RemoteVhdDisk.mjs:74:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async openDisposableDisk (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backup-archive/dist/disks/index.mjs:32:9)\n    at async Promise.all (index 0)\n    at async checkDisk (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/_runners/_writers/_checkDisk.mjs:5:3)\n    at async DiskConsumerVhdDirectory.write (file:///opt/xo/xo-builds/xen-orchestra-202609132201/packages/vhd-lib/disk-consumer/DiskConsumerVhdDirectory.mjs:98:7)\n    at async writeToVhdDirectory (file:///opt/xo/xo-builds/xen-orchestra-202609132201/packages/vhd-lib/disk-consumer/index.mjs:43:10)\n    at async RemoteAdapter.writeVhd (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/RemoteAdapter.mjs:487:14)\n    at async asyncEach.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:276:31)"
                          },
                          "message": "export",
                          "data": {
                            "id": "9890e0c4-ba3a-4810-8245-a49fdf16b16e",
                            "isFull": false,
                            "type": "remote"
                          }
                        }
                      ],
                      "infos": [
                        {
                          "message": "Transfer data using NBD"
                        },
                        {
                          "message": "will delete snapshot data"
                        },
                        {
                          "data": {
                            "vdiRef": "OpaqueRef:59ead5f8-710e-0e75-969e-bc59be6fab7f"
                          },
                          "message": "Snapshot data has been deleted"
                        }
                      ],
                      "end": 1789353852197,
                      "result": {
                        "code": "NOT_SUPPORTED",
                        "message": "Can't init vhd directory without using alias",
                        "name": "Error",
                        "stack": "Error: Can't init vhd directory without using alias\n    at RemoteVhdDisk.init (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backup-archive/dist/disks/RemoteVhdDisk.mjs:74:41)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n    at async openDisposableDisk (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backup-archive/dist/disks/index.mjs:32:9)\n    at async Promise.all (index 0)\n    at async checkDisk (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/_runners/_writers/_checkDisk.mjs:5:3)\n    at async DiskConsumerVhdDirectory.write (file:///opt/xo/xo-builds/xen-orchestra-202609132201/packages/vhd-lib/disk-consumer/DiskConsumerVhdDirectory.mjs:98:7)\n    at async writeToVhdDirectory (file:///opt/xo/xo-builds/xen-orchestra-202609132201/packages/vhd-lib/disk-consumer/index.mjs:43:10)\n    at async RemoteAdapter.writeVhd (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/RemoteAdapter.mjs:487:14)\n    at async asyncEach.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202609132201/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:276:31)"
                      },
                      "message": "backup VM",
                      "data": {
                        "id": "a081f208-4e40-2ca5-c68e-86106af5a8ef",
                        "type": "VM",
                        "name_label": "Utest",
                        "progress": 0
                      }
                    }
                  ],
                  "end": 1789353852211,
                  "infos": [
                    {
                      "data": {
                        "vms": [
                          "a081f208-4e40-2ca5-c68e-86106af5a8ef"
                        ]
                      },
                      "message": "vms"
                    }
                  ]
                }```
                P 1 Reply Last reply
                Reply Quote 1
                • P
                  pierrebrunet Vates 🪐 XO Team @Andrew
                  last edited by

                  @Andrew Hi,
                  I am on it, thank you for the report!

                  M 1 Reply Last reply
                  Reply Quote 0
                  • M
                    manilx @pierrebrunet
                    last edited by

                    @pierrebrunet Opened the same, not realizing this one.

                    https://xcp-ng.org/forum/topic/12471/can-t-init-vhd-directory-without-using-alias

                    P 1 Reply Last reply
                    Reply Quote 0
                    • P
                      pierrebrunet Vates 🪐 XO Team @manilx
                      last edited by pierrebrunet

                      @manilx @andrew @abudef @robertblissitt
                      Here is the branch we are working on: https://github.com/vatesfr/xen-orchestra/tree/fix_alias_vhd

                      It should fix the issue, in case you have time to test it

                      A 1 Reply Last reply
                      Reply Quote 0
                      • A
                        Andrew Top contributor @pierrebrunet
                        last edited by

                        @pierrebrunet I ran the normal delta backups to S3 using fix_alias_vhd and it runs again (full and delta).

                        P 1 Reply Last reply
                        Reply Quote 0
                        • P
                          pierrebrunet Vates 🪐 XO Team @Andrew
                          last edited by

                          @Andrew This branch is now merged, thank you for your feedback!

                          A 1 Reply Last reply
                          Reply Quote 0
                          • A
                            abudef @pierrebrunet
                            last edited by

                            @pierrebrunet Tested and working again, thanks ♥

                            1 Reply Last reply
                            Reply Quote 0
                            • poddingueP poddingue has marked this topic as solved
                            • poddingueP poddingue referenced this topic

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • First post
                              Last post