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

    XO VM Export Fails With Unknown Error

    Scheduled Pinned Locked Moved Solved Management
    11 Posts 6 Posters 627 Views 5 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.
    • X Offline
      XCP-ng-JustGreat
      last edited by

      Using XO from source code. Commit bfb8d3b29e4f9531dda368f6624652479682b69d dated 12 March 2024 @ 11:22:12 broke it. Commit immediately before that 51f95b3c8590492164be38a77ad2c7bf5dc42451 dated 12 March 2024 @ 11:18:20 exporting VM works. Seems to be something related to undici code.

      A 1 Reply Last reply Reply Quote 0
      • U Offline
        uwood @julien-f
        last edited by

        yes, works with 0794a

        1 Reply Last reply Reply Quote 0
        • A Offline
          Andrew Top contributor @XCP-ng-JustGreat
          last edited by

          XCP-ng-JustGreat As required, update to the current XO source commit and try again.

          There were some issues with the undici code that have been resolved.

          X 1 Reply Last reply Reply Quote 1
          • X Offline
            XCP-ng-JustGreat @Andrew
            last edited by

            Andrew Sorry, I should have added that it remains broken in the latest master commit 8b7e1.

            A 1 Reply Last reply Reply Quote 1
            • A Offline
              Andrew Top contributor @XCP-ng-JustGreat
              last edited by

              XCP-ng-JustGreat Danp olivierlambert Right!

              Confirmed on current XOA 5.93.0 and XO source commit 8b7e1.

              Exporting a VM using XVA (with or without compression) errors out with unknown error on the web page.

              Full error from log:

               2024-03-31T03:42:49.816Z xo:xo ERROR HTTP request error {
                 data: {
                   xapi: Xapi {
                     _events: [Object: null prototype],
                     _eventsCount: 2,
                     _maxListeners: undefined,
                     connect: [Function (anonymous)],
                     _sessionCallRetryOptions: [Object],
                     _sessionOpenRetryOptions: [Object],
                     _sessionOpen: [Function (anonymous)],
                     _watchEvents: [Function (anonymous)],
                     _createTransport: [Function: default],
                     _addSyncStackTrace: [Function: identity],
                     _callTimeout: [Function (anonymous)],
                     _httpInactivityTimeout: 300000,
                     _eventPollDelay: 60000,
                     _ignorePrematureClose: true,
                     _pool: [pool],
                     _readOnly: false,
                     _RecordsByType: [Object: null prototype],
                     _reverseHostIpAddresses: false,
                     _call: [Function (anonymous)],
                     _roCallRetryOptions: [Object],
                     _auth: [Object],
                     _allowUnauthorized: true,
                     _undiciDispatcher: [Agent],
                     _humanId: 'root@192.168.250.250',
                     _transport: [Function (anonymous)],
                     _url: [Object],
                     _resolveConnected: undefined,
                     _connected: [Promise [Object]],
                     _disconnected: [Promise [Object]],
                     _sessionId: 'OpaqueRef:34a4eac3-f034-4aa5-83e8-d876f27adbdf',
                     _status: 'connected',
                     _watchEventsError: undefined,
                     _lastEventFetchedTimestamp: 1711856569804,
                     _objects: [Collection],
                     _debounce: 200,
                     _objectsByRef: [Object: null prototype],
                     _resolveObjectsFetched: undefined,
                     _objectsFetched: [Promise [Object]],
                     _eventWatchers: [Object: null prototype] {},
                     _taskWatchers: [Object: null prototype],
                     _watchedTypes: undefined,
                     _callRetryWhenTooManyPendingTasks: [Object],
                     _maxUncoalescedVdis: 1,
                     _preferNbd: false,
                     _nbdOptions: undefined,
                     _syncHookSecret: undefined,
                     _syncHookTimeout: undefined,
                     _vdiDestroyRetryWhenInUse: [Object],
                     _genericWatchers: Set(0) {},
                     _objectWatchers: [Object: null prototype] {},
                     _guessVhdSizeOnImport: true,
                     _restartHostTimeout: 1200000,
                     _vmEvacuationConcurrency: 3,
                     VDI_exportContent: [Function (anonymous)],
                     VM_export: [Function (anonymous)],
                     _migrateVmWithStorageMotion: [Function (anonymous)],
                     VM_snapshot: [Function (anonymous)],
                     getObject: [Function (anonymous)],
                     _resolveDisconnected: [Function (anonymous)],
                     _types: [Array],
                     _lcToTypes: [Object: null prototype],
                     xo: [Object],
                     _nTasks: 3,
                     [Symbol(kCapture)]: false
                   },
                   vmRef: 'OpaqueRef:da534fcd-0d09-4384-a4c0-5ba5f8c37daf',
                   compress: false,
                   format: 'xva'
                 },
                 error: TypeError: Cannot set properties of undefined (setting 'content-disposition')
                     at Xo.handleExport (file:///opt/xo/xo-builds/xen-orchestra-202403291921/packages/xo-server/src/api/vm.mjs:1231:40),
                 fn: 'handleExport'
               }
              
              
              M 1 Reply Last reply Reply Quote 1
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                Thanks Andrew

                Another ping to julien-f

                1 Reply Last reply Reply Quote 1
                • M Offline
                  manilx @Andrew
                  last edited by

                  Andrew Confirmed.
                  This has bugging me for days until I discovered that OVA was fine and did that instead. Should have reported also, so thanks for that.

                  1 Reply Last reply Reply Quote 0
                  • U Offline
                    uwood
                    last edited by

                    Haven't tried OVA but as workaround I used xolite for the XVA export.

                    julien-fJ 1 Reply Last reply Reply Quote 0
                    • julien-fJ Offline
                      julien-f Vates 🪐 Co-Founder XO Team @uwood
                      last edited by

                      XCP-ng-JustGreat Thank you for your report, it should be fixed 🙂

                      https://github.com/vatesfr/xen-orchestra/commit/0794a63

                      0 julien-f committed to vatesfr/xen-orchestra
                      fix(xo-server/vm.export): body does not have a headers prop
                      
                      Introduced by bfb8d3b29
                      
                      Fixes https://xcp-ng.org/forum/post/74554
                      U X 2 Replies Last reply Reply Quote 2
                      • olivierlambertO olivierlambert referenced this topic on
                      • U Offline
                        uwood @julien-f
                        last edited by

                        yes, works with 0794a

                        1 Reply Last reply Reply Quote 0
                        • olivierlambertO olivierlambert marked this topic as a question on
                        • olivierlambertO olivierlambert has marked this topic as solved on
                        • X Offline
                          XCP-ng-JustGreat @julien-f
                          last edited by

                          julien-f olivierlambert I've said it before and I'll say it again: "Wow, that was fast!" You guys do more to foster international cooperation than most of our planet's governments. Keep up the great work. Thank you Vates for creating, maintaining and improving this fantastic software!

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

                            Thank you! Obviously, this wouldn't be possible without our great community 😉

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