Migrate VM Error: VDI_NOT_IN_MAP
-
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.0vm.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:
When I go in XO Health, it's reporting the following:
When I open up the disk in XO, I see the following:
After about 30 minutes, the list of disks changed and now it shows the following:
Any recommendations on what could be the issue(s)? And how best I should proceed to fix the issue(s)?
Thank You,
SW
-
@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. -
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.
-
@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% /EmailsWhat 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:
Thank You,
SW
-
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.
-
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. -
@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.