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

    Migrate VM Error: VDI_NOT_IN_MAP

    Scheduled Pinned Locked Moved Compute
    7 Posts 5 Posters 662 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.
    • S Offline
      stevewest15
      last edited by stevewest15

      Hi,

      Trying to migrate VM from old XCP-NG (8.0.1) to a newer server running xcp-ng (8.2.1) and I'm getting the following error:

      Xen Orchestra, commit d1f2e
      xo-server 5.112.0

      vm.migrate
      {
        "vm": "012b07a1-24cf-6d59-5faf-804e0e187b7a",
        "mapVdisSrs": {
          "94396c87-11b4-4f0e-a996-985cb74d07bf": "088980d4-0fdd-18bf-4c36-a555c35b011b",
          "7a1a6cce-5143-4fd9-b311-6c82d5b26d02": "191299cb-bb3b-872b-3f42-6ae2c3ccab38",
          "220b6828-53d8-42d0-99b3-83e731f19904": "088980d4-0fdd-18bf-4c36-a555c35b011b"
        },
        "mapVifsNetworks": {
          "f6b40ac2-0e4a-51a0-d478-b1c989be72d7": "3a0b3ba8-e6e9-c73c-d968-dde5511f98be",
          "7984e99e-c8df-2f72-fe93-ad1388e7f50f": "67982c5b-b56d-f9dc-0288-b369ee90e16b"
        },
        "migrationNetwork": "3a0b3ba8-e6e9-c73c-d968-dde5511f98be",
        "sr": "47bdfc16-4832-a187-8c8a-0bb377b9e255",
        "targetHost": "675fbc71-a2c7-4301-856a-6dd6a1b9651e"
      }
      {
        "code": 21,
        "data": {
          "objectId": "012b07a1-24cf-6d59-5faf-804e0e187b7a",
          "code": "VDI_NOT_IN_MAP"
        },
        "message": "operation failed",
        "name": "XoError",
        "stack": "XoError: operation failed
          at operationFailed (/opt/xen-orchestra/packages/xo-common/api-errors.js:26:11)
          at file:///opt/xen-orchestra/packages/xo-server/src/api/vm.mjs:561:15
          at Xo.migrate (file:///opt/xen-orchestra/packages/xo-server/src/api/vm.mjs:547:3)
          at Api.#callApiMethod (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:401:20)"
      }
      

      This VM has four attached local storage but XO is only showing 3 local storage while XCP-ng Center (20.04.01) shows the correct number:

      c99a71bc-be13-412b-89da-17c36e81c0bb-image.png

      When I go in XO Health, it's reporting the following:

      b35bf531-bc96-4826-9577-cdab2e653c4e-image.png 7b2921cd-10f7-47ad-8bd6-6740a30d18ad-image.png

      When I open up the disk in XO, I see the following:
      29afef31-a59b-4707-adf4-1e0dcd9b467d-image.png

      After about 30 minutes, the list of disks changed and now it shows the following:
      712f65d0-35f9-4536-a887-28ac2e453ecc-image.png

      Any recommendations on what could be the issue(s)? And how best I should proceed to fix the issue(s)?

      Thank You,

      SW

      DarkbeldinD 1 Reply Last reply Reply Quote 0
      • DarkbeldinD Offline
        Darkbeldin Vates 🪐 Pro Support Team @stevewest15
        last edited by

        stevewest15 Difficult to say but apparently XO considerer the Websites disk as a snapshot and also XCPcenter is reporting no size for it, so there is probably an issue with it.
        You will probably need to dig into the host SMlog to understand the issue.

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

          You shouldn't have a VDI snapshot attached as a regular disk for your VM. This leads to weird behavior. I don't think it's possible to do that with Xen Orchestra, but I suppose it's possible with XCP-ng Center, sadly 😕

          You should be certain to get a regular disk attached to your VM.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            stevewest15 @olivierlambert
            last edited by

            Darkbeldin Thank you, I looked at the SMlog and searched for this snapshot where I only saw activity back in March 27 and yesterday (April 26). See attachment.
            smlog.txt

            olivierlambert Thank you! How do I add a new disk and ensure it doesn't use the same device id (/dev/xvdc) as that is currently used by the VM? The VM currently sees this:

            /dev/xvda1 94G 18G 76G 19% /
            /dev/xvdb1 12G 4.4G 7.7G 37% /var/lib
            /dev/xvdc1 80G 23G 58G 28% /var/www
            /dev/xvdd1 200G 54G 147G 27% /Emails

            cb0df2c2-2fd5-4da2-be25-bfc48da21f3e-image.png

            What does "Import VDI content" and "Export VDI content" do? Just trying to see if I can copy this snapshot and then attach it to the VM:
            b2e6377d-3cd0-430a-941d-9840599f9566-image.png

            Thank You,

            SW

            1 Reply Last reply Reply Quote 0
            • S Offline
              StormMaster
              last edited by

              First of all, sorry for hijacking this old topic but as it was so well documented, it made more sense to expand upon it then to try and recreate everything that was already here.

              Second, I generally don't use XCP-ng Center. However, once coming across this post I did open it to verify that what I saw in this post was the same as what my XCP-ng Center was showing.

              Third, I am on one of the latest community additions but I have seen this occur a couple of time on previous versions as well.

              Okay with that out of the way, I now believe that I know what is causing this to happen...

              When you have a VM with multiple VDI's in it and one of those VDI's is both large and fairly busy, if the following exists then XO will not show one or more of the smaller drives despite the hosts still functioning normally while working on that VM:

              • The virtual machine has multiple snapshots of all of the VDI's in it. (IE like after several backups)
              • For some reason a bunch of the snapshots are consolidated at one.
              • All the snapshots that were consolidated are removed from the VM and the snapshots of the VDI's have coalesced but the system is still working on coalescing the large VDI.
              • If a backup process tries to work on this VM, it will create a snapshot that XO shows to stay connected to the smaller drives even though the backup is skipped because a new snapshot of the large VDI can't be created due to the older snapshots not being coalesced yet.

              Once the large VDI has properly coalesced all it's snapshots, the hosts will continue to treat it as any other VM but that VDI never does show up in XO again.

              The only solution that I have found to fix it is to turn off the VM and then create a copy of missing VDI or VDI's and use those copies to replace the missing VDI's.

              I know that I am just a member of the community but I hope that this helps everyone to understand what is going when this happens to them. 😉

              It happened to me a couple of times before I was able to peace together the whole puzzle.

              1 Reply Last reply Reply Quote 0
              • stephane-m-devS Offline
                stephane-m-dev Vates 🪐 XO Team
                last edited by

                Hi,

                Thanks to all for the information you shared.
                We are currently testing a fix for the VDI_NOT_IN_MAP error.

                The fix should be released for the next update.
                So feel free to test and tell us if it fixed the problem.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  stevewest15 @stephane-m-dev
                  last edited by

                  StormMaster Thank you for sharing your findings!

                  stephane-m-dev Thank you for the update! Looking forward to testing the fix just not sure how to replicate other than what StormMaster found.

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