VM migration from esxi fails with "Cannot read properties of undefined (reading 'startsWith')"
-
I'm trying to migrate an esxi VM to XCP-ng.
The VM is turned off. "Thin mode" is off "Stop the source VM" is off "Stop on error" is on (also tried with "OFF").
I have tried doing this:
A. through vcenter
B. drive to the esxi host
C. using the IP address in lieu of the dns name.In each case, as soon as I click "Import" I get the message below.
vm.importMultipleFromEsxi { "concurrency": 2, "host": "vcenter.internal.local", "network": "ca618529-000b-0c6e-52ba-f6c985134163", "password": "* obfuscated *", "sr": "b3b03de1-f7d1-92ca-68a4-40370e7649d3", "sslVerify": false, "stopOnError": true, "stopSource": false, "thin": false, "user": "adminname@vspehere.locall", "vms": [ "vm-2215" ] } { "succeeded": {}, "message": "Cannot read properties of undefined (reading 'startsWith')", "name": "TypeError", "stack": "TypeError: Cannot read properties of undefined (reading 'startsWith') at Esxi.#inspectVmdk (file:///opt/xo/xo-builds/xen-orchestra-202312090402/@xen-orchestra/vmware-explorer/esxi.mjs:209:18) at Esxi.getTransferableVmMetadata (file:///opt/xo/xo-builds/xen-orchestra-202312090402/@xen-orchestra/vmware-explorer/esxi.mjs:293:40) at Task.runInside (/opt/xo/xo-builds/xen-orchestra-202312090402/@vates/task/index.js:158:22) at Task.run (/opt/xo/xo-builds/xen-orchestra-202312090402/@vates/task/index.js:141:20) at MigrateVm.migrationfromEsxi (file:///opt/xo/xo-builds/xen-orchestra-202312090402/packages/xo-server/src/xo-mixins/migrate-vm.mjs:177:28) at file:///opt/xo/xo-builds/xen-orchestra-202312090402/packages/xo-server/src/api/vm.mjs:1415:30 at Task.runInside (/opt/xo/xo-builds/xen-orchestra-202312090402/@vates/task/index.js:158:22) at Task.run (/opt/xo/xo-builds/xen-orchestra-202312090402/@vates/task/index.js:141:20) at asyncEach.concurrency.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202312090402/packages/xo-server/src/api/vm.mjs:1413:11)" }
-
@archw it looks like the VM disk don't have path. Does this VM has a specific storage configuration ?
-
Its just a normal VM on one of the hosts?
-
@archw thanks,
the vmdk files are ok ? in the same datastore or in another ? do their name contains special characters ?
-
@florent
As far as I know, the vmdk files are fine. The VM fires right up on the esxi host.
The files are local storage to that host ( "[datastore1_host2] VM2022/VM22-2.vmdk") -
@florent
For the heck of it, I made a new VM in esxi and pointed it to the vmdk file. At that point, xcp-ng would perform the loading conversion process using the new VM setup.I have no idea what was wrong with the original vmx setup file in esxi.
-
Maybe you can consider to use third-party tools for cross-platform VM migrations. That will be more convenient and efficient.
-
If this specific VM is causing issue, you can fallback on Clonezilla or something similar