Import from VMware err: name: AssertionError: Expected "actual" to be strictly unequal to: undefined
-
single host XCP-ng 8.2.1 w/ local SR,
XO (ronivay installer)(installed today) , VM on above.
ESXi 8.0u1 (expired trial) all VMs stopped.Using XO Import from VMware, I sucessfully imported two VMs: a Windows10 VM, and a pfSense VM. I started both and they work.
Next I tried to import a Windows Server 2012R2 (single 60GB disk) from same ESX host. It fails within about five seconds with:
vm.importMultipleFromEsxi { "concurrency": 2, "host": "10.16.75.5", "network": "eddfca3c-8b32-7cf8-510d-debef0bff592", "password": "* obfuscated *", "sr": "2a160b8d-11ec-776b-7ce9-0af0ceb540c7", "sslVerify": false, "stopOnError": true, "stopSource": false, "template": "b6d0600e-677b-376a-507e-8f9dda9424cb-11c46476-bd5c-4d75-9cf0-57fe55343ba3", "user": "root", "vms": [ "3" ] } { "generatedMessage": true, "code": "ERR_ASSERTION", "operator": "notStrictEqual", "succeeded": {}, "message": "Expected \"actual\" to be strictly unequal to: undefined", "name": "AssertionError", "stack": "AssertionError [ERR_ASSERTION]: Expected \"actual\" to be strictly unequal to: undefined at Esxi.#findDatacenter (file:///opt/xo/xo-builds/xen-orchestra-202406131610/@xen-orchestra/vmware-explorer/esxi.mjs:74:5) at Esxi.#download (file:///opt/xo/xo-builds/xen-orchestra-202406131610/@xen-orchestra/vmware-explorer/esxi.mjs:124:56) at Esxi.download (file:///opt/xo/xo-builds/xen-orchestra-202406131610/@xen-orchestra/vmware-explorer/esxi.mjs:139:41) at Esxi.#inspectVmdk (file:///opt/xo/xo-builds/xen-orchestra-202406131610/@xen-orchestra/vmware-explorer/esxi.mjs:249:21) at Esxi.getTransferableVmMetadata (file:///opt/xo/xo-builds/xen-orchestra-202406131610/@xen-orchestra/vmware-explorer/esxi.mjs:351:17) at Task.runInside (/opt/xo/xo-builds/xen-orchestra-202406131610/@vates/task/index.js:169:22) at Task.run (/opt/xo/xo-builds/xen-orchestra-202406131610/@vates/task/index.js:153:20) at MigrateVm.migrationfromEsxi (file:///opt/xo/xo-builds/xen-orchestra-202406131610/packages/xo-server/src/xo-mixins/vmware/index.mjs:186:22) at file:///opt/xo/xo-builds/xen-orchestra-202406131610/packages/xo-server/src/api/vm.mjs:1480:30 at Task.runInside (/opt/xo/xo-builds/xen-orchestra-202406131610/@vates/task/index.js:169:22) at Task.run (/opt/xo/xo-builds/xen-orchestra-202406131610/@vates/task/index.js:153:20) at asyncEach.concurrency.concurrency (file:///opt/xo/xo-builds/xen-orchestra-202406131610/packages/xo-server/src/api/vm.mjs:1478:11)" }
-
@sshughes Can/have you run updates on the XO VM itself, then run the XOInstaller script to check for XO updates? That's what fixes issues for me most of the time.
-
@Nick-085
Just did. Reports nothing new.
Import fails with same error.[info] Checking current node.js version [ok] node.js version already on 20, checking updates [info] Fetching Xen Orchestra source code [info] Creating install directory: /opt/xo/xo-builds/xen-orchestra-202406132228 [info] No changes to Xen Orchestra since previous install. Skipping build. Use the --force to update anyway. [info] Cleaning up install directory: /opt/xo/xo-builds/xen-orchestra-202406132228
-
@sshughes also ran apt-get update apt-get upgrade, but again... I installed this VM less than 12 hours ago, so nothing new.
-
@sshughes Hmmm, that's frustrating. If I remember correctly, that is a Python error. It might be something with the Python script itself. Is the VM off when you're trying to import it? It shouldn't matter, but just something to try.
-
@sshughes
Shoundnt node.js be 18 ? -
@ph7 I also have version 20, but no problem importing from VMware
-
@ph7 said in Import from VMware err: name: AssertionError: Expected "actual" to be strictly unequal to: undefined:
Shoundnt node.js be 18 ?
FYI, that is no longer required.
-
above log entry is result of using XO web UI to import from ESXi and is the 3rd vm we tried to import. The first two imports were successful.
I used ronivay's installer and chose to have xo-server run as non-root user.
Decided to try using xo-cli vm.importFromEsxi.
I SSH to the XO VM as root and figure out how to get xo-cli register to work.
Using parameters displayed in the above log entry I think I was able to properly construct the xo-cli vm.importFromEsxi command as follows:xo-cli vm.importFromEsxi host=10.16.75.5 user=root password=****** sslVerify=false vm=ParishSVR2 sr=2a160b8d-11ec-776b-7ce9-0af0ceb540c7 network=eddfca3c-8b32-7cf8-510d-debef0bff592 template=b6d0600e-677b-376a-507e-8f9dda9424cb-17a818b5-20a6-4d34-a7ef-320da9ef4c14
The result is a different error. Does this offer any more help as to what went wrong?
✖ JsonRpcError: can't get config of object ParishSVR2 (Type: VirtualMachine) at Peer._callee$ (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/json-rpc-peer/dist/index.js:139:44) at tryCatch (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:45:16) at Generator.<anonymous> (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:133:17) at Generator.next (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:74:21) at asyncGeneratorStep (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24) at _next (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9) at /opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7 at new Promise (<anonymous>) at Peer.<anonymous> (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:12) at Peer.exec (/opt/xo/xo-builds/xen-orchestra-202406131610/node_modules/json-rpc-peer/dist/index.js:182:20) { code: -32000, data: { message: "can't get config of object ParishSVR2 (Type: VirtualMachine)", name: 'Error', stack: "Error: can't get config of object ParishSVR2 (Type: VirtualMachine)\n" + ' at Esxi.fetchProperty (file:///opt/xo/xo-builds/xen-orchestra-202406131610/@xen-orchestra/vmware-explorer/esxi.mjs:447:13)\n' + ' at processTicksAndRejections (node:internal/process/task_queues:95:5)', succeeded: {} } }
-
@sshughes Pretty certain there is nothing wrong with XO. Seems there is a problem with this VM on ESX. vSphere can perform Export on the other VMs, but not the one in question. Task list says an Export is running, but we never get the prompt to select components for export. Thanks. If I learn any more, will report back.
-
That's interesting, thanks for the feedback @sshughes and keep us posted!