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

    XenOrchestra not showing VM Disks on Pool (on single Server working) - XCP-ng Center is showing them

    Scheduled Pinned Locked Moved Unsolved Xen Orchestra
    29 Posts 8 Posters 4.6k Views 9 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.
    • K Offline
      kagbasi-wgsdac @poddingue
      last edited by

      @poddingue Thanks for the response. I got side tracked with another issue and didn't get that bug report filed, I'll do that as soon as possible.

      It feels like I'm playing with a hand grenade...lol, quite scary!

      1 Reply Last reply Reply Quote 1
      • K Offline
        kagbasi-wgsdac @poddingue
        last edited by

        @poddingue Bug report filed as requested — https://github.com/xcp-ng/xcp/issues/825 — and tagging @Team-Storage per your suggestion.

        Full evidence bundle is attached to the issue (versions, sweep output, vhd-util vs xe comparison, SMlog). Summary of what I found:

        One correction to the mechanism, and I think it matters. The recap describes is-a-snapshot being flipped to true. On my system that isn't what's happening — is-a-snapshot is false on every affected VDI. The field being wrongly written is snapshot-of, which is getting populated on base disks that aren't snapshots at all. XO's disappearing-disks symptom is consistent with either (it filters on a non-empty snapshot-of), but if the storage team is hunting for a bad is-a-snapshot write, that may be the wrong field. Every affected VDI here looks like:

        is-a-snapshot: false      <-- correct
        snapshot-of:   <populated with an unrelated VDI's UUID>   <-- wrong
        

        A VDI that is a snapshot of itself. The clearest single artifact:

        uuid:          806f7f42-083f-4a40-b3f1-0700d00bab5a
        name-label:    WinSrv2022SHB_Disk1_Data
        is-a-snapshot: false
        snapshot-of:   806f7f42-083f-4a40-b3f1-0700d00bab5a   <-- itself
        snapshot-time: 20260709T11:19:15Z
        sm-config:     vhd-parent: c86e3247-...   <-- bears no relation to the snapshot-of value
        

        No valid code path produces snapshot-of = self. Whatever writes this field isn't validating the target.

        It's still actively corrupting new VDIs — this is not just legacy damage. That self-referential VDI was created 2026-07-09, a week after my patch + reboot. Sweeps 9 days apart went from ~180 → 191 affected VDIs on one SR, and a fourth anchor UUID appeared that didn't exist in the first sweep. Newly created VHDs keep landing in the affected set. So "stop it happening again" is the urgent half of the two-part fix, at least in my case.

        The bogus targets cluster onto a tiny anchor set, and the anchors point at each other:

        Count Anchor
        97 937c3945 (→ a893fdb4)
        50 a893fdb4 (→ ea150883)
        37 ea150883
        7 806f7f42 (→ itself, new since Jul 9)

        That looks less like corrupted lineage and more like the field being filled from an incorrect/uninitialised source.

        On-disk VHDs are completely healthy. vhd-util check says valid, parent locators are consistent, GC reports no work. The two VDIs the DB calls parent/child are, on disk, siblings under a common parent. The corruption is purely in the XAPI database — which is good news for recoverability.

        The VDI_IN_USE is not a real lock. current-operations is empty, xe task-list is empty, no tapdisk holds it. VM.start fails because it's walking a snapshot relationship that doesn't exist on disk. Reproduces from xe on the pool master with XO entirely out of the path — which is why I filed against xcp-ng/xcp rather than the XO tracker.

        Versions: XCP-ng 8.3.0, xapi 26.1.11 (xapi-core-26.1.11-1.2), sm-3.2.12-17.9, sm-fairlock-3.2.12-17.9, blktap 3.55.5-9.1, build 20260618.

        I have not attempted to bulk-clear the fields — on-disk data is intact and I'd rather not do a mass write against the XAPI DB on a live SR without guidance. Backing store snapshotted as a safety net.

        Happy to run whatever diagnostics would help. And +1 to the hand-grenade feeling — the affected set growing on its own is the part that worries me.

        poddingueP J 2 Replies Last reply Reply Quote 2
        • poddingueP Offline
          poddingue Vates 🪐 @kagbasi-wgsdac
          last edited by

          @kagbasi-wgsdac , thank you so much for the issue creation and the details, that will help for sure! 👍

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kagbasi-wgsdac @poddingue
            last edited by

            @poddingue You're most welcome, sir. 👍

            1 Reply Last reply Reply Quote 1
            • J Offline
              john.c @kagbasi-wgsdac
              last edited by

              @kagbasi-wgsdac said:

              @poddingue Bug report filed as requested — https://github.com/xcp-ng/xcp/issues/825 — and tagging @Team-Storage per your suggestion.

              Full evidence bundle is attached to the issue (versions, sweep output, vhd-util vs xe comparison, SMlog). Summary of what I found:

              One correction to the mechanism, and I think it matters. The recap describes is-a-snapshot being flipped to true. On my system that isn't what's happening — is-a-snapshot is false on every affected VDI. The field being wrongly written is snapshot-of, which is getting populated on base disks that aren't snapshots at all. XO's disappearing-disks symptom is consistent with either (it filters on a non-empty snapshot-of), but if the storage team is hunting for a bad is-a-snapshot write, that may be the wrong field. Every affected VDI here looks like:

              is-a-snapshot: false      <-- correct
              snapshot-of:   <populated with an unrelated VDI's UUID>   <-- wrong
              

              A VDI that is a snapshot of itself. The clearest single artifact:

              uuid:          806f7f42-083f-4a40-b3f1-0700d00bab5a
              name-label:    WinSrv2022SHB_Disk1_Data
              is-a-snapshot: false
              snapshot-of:   806f7f42-083f-4a40-b3f1-0700d00bab5a   <-- itself
              snapshot-time: 20260709T11:19:15Z
              sm-config:     vhd-parent: c86e3247-...   <-- bears no relation to the snapshot-of value
              

              No valid code path produces snapshot-of = self. Whatever writes this field isn't validating the target.

              It's still actively corrupting new VDIs — this is not just legacy damage. That self-referential VDI was created 2026-07-09, a week after my patch + reboot. Sweeps 9 days apart went from ~180 → 191 affected VDIs on one SR, and a fourth anchor UUID appeared that didn't exist in the first sweep. Newly created VHDs keep landing in the affected set. So "stop it happening again" is the urgent half of the two-part fix, at least in my case.

              The bogus targets cluster onto a tiny anchor set, and the anchors point at each other:

              Count Anchor
              97 937c3945 (→ a893fdb4)
              50 a893fdb4 (→ ea150883)
              37 ea150883
              7 806f7f42 (→ itself, new since Jul 9)

              That looks less like corrupted lineage and more like the field being filled from an incorrect/uninitialised source.

              On-disk VHDs are completely healthy. vhd-util check says valid, parent locators are consistent, GC reports no work. The two VDIs the DB calls parent/child are, on disk, siblings under a common parent. The corruption is purely in the XAPI database — which is good news for recoverability.

              The VDI_IN_USE is not a real lock. current-operations is empty, xe task-list is empty, no tapdisk holds it. VM.start fails because it's walking a snapshot relationship that doesn't exist on disk. Reproduces from xe on the pool master with XO entirely out of the path — which is why I filed against xcp-ng/xcp rather than the XO tracker.

              Versions: XCP-ng 8.3.0, xapi 26.1.11 (xapi-core-26.1.11-1.2), sm-3.2.12-17.9, sm-fairlock-3.2.12-17.9, blktap 3.55.5-9.1, build 20260618.

              I have not attempted to bulk-clear the fields — on-disk data is intact and I'd rather not do a mass write against the XAPI DB on a live SR without guidance. Backing store snapshotted as a safety net.

              Happy to run whatever diagnostics would help. And +1 to the hand-grenade feeling — the affected set growing on its own is the part that worries me.

              Has this issue been validated on a storage server built around Debian 13, LVM and ext4 or just TrueNAS when connected to XCP-ng version 8.3.0. As part of the XAPI DB corruption. Can anyone answer this please or give a clue?

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kagbasi-wgsdac @john.c
                last edited by

                @john.c Unfortunately, I cannot answer your question in the affirmative. I only use XCP-ng with TrueNAS.

                @Team-Storage have y'all had a chance to take a look at the bug report I filed? This issue is quite serious.

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kagbasi-wgsdac
                  last edited by

                  @john.c See this post - https://xcp-ng.org/forum/post/105564

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

                    The July updates batch that went out on 28 July carries xapi-26.1.11-1.3.xcpng8.3, and @kagbasi-wgsdac has since confirmed on https://github.com/xcp-ng/xcp/issues/825 that three days after patching his disks are all visible again and reverting a snapshot no longer duplicates VDIs.
                    The blog entry for that batch names the fix as non-snapshotted VBDs staying attached after VM.revert, a regression from xapi-26.1.4-3.3: https://xcp-ng.org/blog/2026/07/28/july-2026-updates-1-for-xcp-ng-8-3-lts/. Host reboots are needed. That stops new damage, but it does not unstamp VDIs that were already hit, so if disks are still hidden after you patch you probably still want the repair script at https://xcp-ng.org/forum/post/105564. 🤷
                    My post above also had the mechanism wrong, and @kagbasi-wgsdac corrected it: the field being wrongly written is snapshot-of on base disks, not is-a-snapshot.
                    If anyone is still watching disks disappear on a fully updated pool, please say so here, because that would be something new rather than the tail of this one.

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      kagbasi-wgsdac @poddingue
                      last edited by

                      @poddingue

                      I'm seeing a recurrence of the snapshot_of / hidden-disks issue after patching to xapi-26.1.16-1.2 (both hosts, rebooted). Unusual element this time: snapshot-fixer.py dry-run flags ~260 VDIs across the SR that all cite a single OpaqueRef which resolves to no VDI (xe vdi-list | grep <ref> returns nothing). Holding off on rewrite until I understand whether that single-dangling-ref pattern is safe, given the set appears to include base VDIs of legitimate snapshots.

                      Full technical detail and questions posted on GitHub: https://github.com/xcp-ng/xcp/issues/844.

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

                        Apologies for the long silence on my end — real life got in the way and I couldn't dig into this for a while. Finally found the time now to go through it again properly, helped a lot by the details others have already posted here in the meantime.

                        I don't think this adds a new root cause, but it does corroborate what @kagbasi-wgsdac described — same "mass collapse onto a single anchor UUID" pattern, and in my case too that anchor is a real, still-in-use base disk, not a dangling/non-existent OpaqueRef (referencing vatesfr/xen-orchestra#9578).

                        Environment: 2-host pool, shared NFS SR, XO recently updated to the latest version (didn't change anything regarding this issue, as expected since it's XAPI-side).

                        Ran a read-only xe vdi-list params=uuid,name-label,is-a-snapshot,snapshot-of,snapshot-time directly against the pool master. Result: 47 of 196 VDIs match the pattern (is-a-snapshot: false but snapshot-of populated). All 47 point to the exact same single anchor UUID — which resolves to one specific, actively-used base VDI, not a missing reference.

                        snapshot-time on most affected VDIs is the epoch default (1970-01-01T00:00:00Z), but a handful show plausible real dates (e.g. late 2025 / early 2026) — suggesting those entries originally had a legitimate snapshot-of relationship that got overwritten by whatever corrupted the metadata.

                        Currently-running VMs affected (100% of each VM's disks affected in every case):

                        VM OS Disks Sizes
                        VM-1 Windows Server 2016 1 50 GB
                        VM-2 Windows Server 2016 3 50 / 200 / 450 GB
                        VM-3 Windows Server 2019 3 100 / 100 / 100 GB
                        VM-4 Windows 11 Pro 2 50 / 100 GB
                        VM-5 (decommissioned) Windows Server 2016 2 100 / 50 GB
                        VM-6 Ubuntu 24.04 2 10 / 10 GB
                        VM-7 Ubuntu 24.04 2 10 / 10 GB
                        VM-8 Windows Server 2025 3 25 / 25 / 64 GB
                        VM-9 Ubuntu 24.04 2 10 / 10 GB

                        On top of that, ~28 more affected VDIs are orphaned/unattached objects ("base copy" leftovers, old ISO references) — same pattern, no VBD attached.

                        Not touching any of this (no snapshot-fixer.py, no manual vdi-param-set) given the risk of severing legitimate snapshot relationships that's already been flagged here. Happy to provide a full anonymized xe vdi-list dump if that's useful for tracking down the root cause.

                        Big thanks to everyone who kept digging into this and shared their findings here — especially @kagbasi-wgsdac for the detailed write-up that pointed me in the right direction, and of course @poddingue and the whole Vates team for staying on top of this and keeping us updated despite no clear timeline yet. Really appreciate the effort that goes into this, especially for something as tricky as a metadata corruption bug across production pools.

                        Kind Regards and thx again
                        Alex

                        1 Reply Last reply Reply Quote 0

                        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