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

    VM migration from esxi fails with "Cannot read properties of undefined (reading 'startsWith')"

    Scheduled Pinned Locked Moved Management
    8 Posts 4 Posters 1.3k 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.
    • A Offline
      archw
      last edited by olivierlambert

      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)"
      }
      
      florentF 1 Reply Last reply Reply Quote 0
      • florentF Offline
        florent Vates 🪐 XO Team @archw
        last edited by

        @archw it looks like the VM disk don't have path. Does this VM has a specific storage configuration ?

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          archw @florent
          last edited by

          @florent

          Its just a normal VM on one of the hosts?

          florentF 1 Reply Last reply Reply Quote 0
          • florentF Offline
            florent Vates 🪐 XO Team @archw
            last edited by

            @archw thanks,

            the vmdk files are ok ? in the same datastore or in another ? do their name contains special characters ?

            A 2 Replies Last reply Reply Quote 0
            • A Offline
              archw @florent
              last edited by

              @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")

              1 Reply Last reply Reply Quote 0
              • A Offline
                archw @florent
                last edited by

                @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.

                1 Reply Last reply Reply Quote 1
                • K Offline
                  kerdiby 3rd party vendor
                  last edited by

                  Maybe you can consider to use third-party tools for cross-platform VM migrations. That will be more convenient and efficient.

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

                    If this specific VM is causing issue, you can fallback on Clonezilla or something similar 🙂

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