vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
743 stars 260 forks source link

Importing OVA fails #3468

Closed jrubenc closed 5 years ago

jrubenc commented 5 years ago

XO Appliance Current version: xo-server 5.27.2 / xo-web 5.27.1

When importing (tried both with Chrome and Firefox) a 210 Gb OVA file, an error happens:

Error: offset is outside the bounds of the DataView

It works with a 50Gb OVA though.

Js console shows no errors at all.

Just for precaution, tried again to import an OVA using the new XOA version. This time, a 5Gb one (exported from VSphere, as before, when it worked).

Sep 30 10:40:22 xoa xo-server[603]: 2018-09-30T08:40:22.924Z xo:xapi Creating VM Redmine
Sep 30 10:40:23 xoa xo-server[603]: 2018-09-30T08:40:23.030Z xo:xapi Creating VDI Hard Disk 1 on Local storage
Sep 30 10:40:23 xoa xo-server[603]: 2018-09-30T08:40:23.032Z xo:xapi Creating VIF for VM Redmine on network LAN
Sep 30 10:40:24 xoa xo-server[603]: 2018-09-30T08:40:24.012Z xo:xapi Creating VBD for VDI Hard Disk 1 on VM [Importing...] Redmine
Sep 30 10:40:26 xoa xo-server[603]: [Warn] Unhandled error event: TypeError: Object is not async iterable
Sep 30 10:40:26 xoa xo-server[603]: at _asyncIterator (/usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/dist/createReadableSparseStream.js:38:325)
Sep 30 10:40:26 xoa xo-server[603]: at /usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/src/createReadableSparseStream.js:126:2
Sep 30 10:40:26 xoa xo-server[603]: at next (native)
Sep 30 10:40:26 xoa xo-server[603]: at resume (/usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/dist/createReadableSparseStream.js:24:362)
Sep 30 10:40:26 xoa xo-server[603]: at /usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/dist/createReadableSparseStream.js:24:540
Sep 30 10:40:26 xoa xo-server[603]: at run (/usr/local/lib/node_modules/xo-server-xoa/node_modules/core-js/modules/es6.promise.js:75:22)
Sep 30 10:40:26 xoa xo-server[603]: at /usr/local/lib/node_modules/xo-server-xoa/node_modules/core-js/modules/es6.promise.js:92:30
Sep 30 10:40:26 xoa xo-server[603]: at flush (/usr/local/lib/node_modules/xo-server-xoa/node_modules/core-js/modules/_microtask.js:18:9)
Sep 30 10:40:26 xoa xo-server[603]: at _combinedTickCallback (internal/process/next_tick.js:73:7)
Sep 30 10:40:26 xoa xo-server[603]: at process._tickCallback (internal/process/next_tick.js:104:9)

The task is still at 0% after 50 minutes. The VM can't be started (fails with a "disk not bootable").

olivierlambert commented 5 years ago

@nraynaud does this error ring any bell?

nraynaud commented 5 years ago

the error might very well be in my code, I have done things in async iterators.

nraynaud commented 5 years ago

I have a reproduction of the bug at home, still working on it.

julien-f commented 5 years ago

@nraynaud Let me know if you need some help.

nraynaud commented 5 years ago

@julien-f I made a commit that "fixes" the issue here https://github.com/vatesfr/xen-orchestra/commit/692f542d9277b40405b0ffe876f523d60bfe9bbe

I'd be glad if you could look into it.

jrubenc commented 5 years ago

Does that also fix the "Error: offset is outside the bounds of the DataView" problem?

nraynaud commented 5 years ago

@jrubenc good point, I forgot to investigate it. It's probably unrelated. I'll have a look now.

julien-f commented 5 years ago

@nraynaud The fix regarding the async iterators has been merged, I'm keeping this issue open regarding the DataView problem.

nraynaud commented 5 years ago

yep, I'm still on it, I had tooling issues.

julien-f commented 5 years ago

No problem, keep me posted if you need my help :slightly_smiling_face:

nraynaud commented 5 years ago

We are still on the problem, I found 2 issues, we are in QA.

jrubenc commented 5 years ago

As of 21/November:

KalturaCE5.ova (371.52 GiB) Error: Offset is outside the bounds of the DataView

xo-server 5.30.1 xo-web 5.30.0

olivierlambert commented 5 years ago

Would it be possible to test on your OVA? Can you give us a link to download it?

jrubenc commented 5 years ago

Uhm... let me find a way...

olivierlambert commented 5 years ago

Thanks. We have hard time to figure all cases, because some OVAs works, some don't. That's why I'd like to get a problematic OVA, so we could debug why it fails :)

jrubenc commented 5 years ago

Exported using:

VSphere Client 5.5.0 Build 3024345 VMware ESXi 5.5.0 Build 3029944

nraynaud commented 5 years ago

I think the error "Offset is outside the bounds of the DataView" is fixed here: https://github.com/vatesfr/xen-orchestra/pull/3504/commits/e77c4fdc25e2b9b99947b5901b364e152787940b#diff-601f8f9db295ad345c34faa8113e792cR54

Slugger commented 5 years ago

I just updated my master to get this fix and it's still not working. Attempting to import an ova of size 17GB results in the same error message.

Danp2 commented 5 years ago

@nraynaud @julien-f Can this issue be reopened?

julien-f commented 5 years ago

@Danp2 If that's ok for you, let's switch to the newly created #3900 :slightly_smiling_face: