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

    Auto Power ON says Invalid Parameters

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    21 Posts 4 Posters 2.2k Views 2 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.
    • M Offline
      msagautam
      last edited by

      I did three clean installs of the xcp-ng and XO on 3 different hardware.
      So far I am unable to get Auto Power on enabled through XO.
      I keep getting "invalid parameters" such as here:
      6af0f19d-9dd3-4a32-8287-a7cec18def74-image.png

      When I set auto power on from xcp-ng through cli, then I cannot disable auto power on through Orchestra. I get the same message.

      Is there something I need to configure to get this option enabled?

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

        What's the log is telling exactly?

        1 Reply Last reply Reply Quote 0
        • M Offline
          msagautam
          last edited by

          There is not much information in the logs:
          16effcd9-39d8-4549-9c54-2acc66d0c2e7-image.png

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

            Yes there is 😉 Click on the "eye" icon and copy paste the content here 🙂

            1 Reply Last reply Reply Quote 0
            • M Offline
              msagautam
              last edited by olivierlambert

              I found this when I hit the eye button:

              m.set
              {
                "auto_poweron": true,
                "id": "f39bfc1d-0e99-69ef-833c-db12c9490c6d"
              }
              {
                "code": 10,
                "data": {
                  "errors": [
                    {
                      "code": null,
                      "reason": "strict",
                      "message": "should not contains property [\"auto_poweron\"]",
                      "property": "@"
                    }
                  ]
                },
                "message": "invalid parameters",
                "name": "XoError",
                "stack": "XoError: invalid parameters
                  at Object.factory [as invalidParameters] (/home/gautam/xen-orchestra/packages/xo-common/src/api-errors.js:21:31)
                  at Xo.checkParams (/home/gautam/xen-orchestra/packages/xo-server/src/xo-mixins/api.js:71:17)
                  at /home/gautam/xen-orchestra/packages/xo-server/src/xo-mixins/api.js:277:18
                  at Generator.next (<anonymous>)
                  at asyncGeneratorStep (/home/gautam/xen-orchestra/packages/xo-server/dist/xo-mixins/api.js:38:103)
                  at _next (/home/gautam/xen-orchestra/packages/xo-server/dist/xo-mixins/api.js:40:194)
                  at tryCatcher (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/util.js:16:23)
                  at Promise._settlePromiseFromHandler (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/promise.js:517:31)
                  at Promise._settlePromise (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/promise.js:574:18)
                  at Promise._settlePromiseCtx (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/promise.js:611:10)
                  at _drainQueueStep (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/async.js:142:12)
                  at _drainQueue (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/async.js:131:9)
                  at Async._drainQueues (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/async.js:147:5)
                  at Immediate.Async.drainQueues (/home/gautam/xen-orchestra/node_modules/bluebird/js/release/async.js:17:14)
                  at runCallback (timers.js:810:20)
                  at tryOnImmediate (timers.js:768:5)
                  at processImmediate [as _immediateCallback] (timers.js:745:5)"
              }
              
              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                I edited your post to use Markdown syntax, it's far more readable 😉

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

                  Double check you are using latest commit on master (I suppose you aren't using XOA?)

                  If it's still an issue, you could create an issue on XO GitHub repository.

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    msagautam
                    last edited by

                    Thanks, I am new to xcp-ng, XenOrchestra and these forums. Please forgive my newbie faux pas.

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

                      No problem at all 🙂 Here is the XO issue repository (just be sure to be on latest commit before creating the issue): https://github.com/vatesfr/xen-orchestra/issues/new

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        msagautam @olivierlambert
                        last edited by msagautam

                        @olivierlambert I am building from source following this link: "https://xen-orchestra.com/docs/from_the_sources.html"
                        which refers to the following

                        git clone -b master http://github.com/vatesfr/xen-orchestra
                        

                        Should I be cloning off a different repo instead?

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

                          No, that's perfect 🙂 Just check you are indeed on the latest commit.

                          M 1 Reply Last reply Reply Quote 0
                          • M Offline
                            msagautam @olivierlambert
                            last edited by msagautam

                            @olivierlambert Thank you.
                            It looks like the backup generated from a different server does not work well for options such as "auto power on" when restored on a new server.
                            But if I just build xo from source in a new VM on the new server, "auto power on" works perfectly.

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

                              @msagautam said in Auto Power ON says Invalid Parameters:

                              @olivierlambert Thank you.
                              It looks like the backup generated from a different server does not work well for options such as "auto power on" when restored on a new server.
                              But if I just build xo from source in a new VM on the new server, "auto power on" works perfectly.

                              Pinging @julien-f if he knows about that.

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

                                This should be fixed on master: https://github.com/vatesfr/xen-orchestra/commit/e171d8ed0e786772c9ccdb7dd4127d42faae141a

                                0 julien-f committed to vatesfr/xen-orchestra
                                fix(xo-server/vm.set): add `auto_poweron` to params
                                
                                Related to b8524732ce5fc466ef73664ff02cd4e09fca7ad9
                                
                                Fixes #4295
                                1 Reply Last reply Reply Quote 0
                                • olivierlambertO Offline
                                  olivierlambert Vates 🪐 Co-Founder CEO
                                  last edited by

                                  Yeah but is it affecting VMs backup before the fix? I mean, if you restore a VM with the issue, even with the fix, should it work?

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    msagautam
                                    last edited by

                                    I backed up the server 3 days ago, which is when e171d8e commit has been made. So it is most likely that I have cloned from github and installed xo-server before this fix.
                                    To answer oliver's question, the restore would still have the issue because the xo-server built is before the fix. So I will have to fetch the update and rebuild xo-server again, and then I have to backup for future restores.

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

                                      Just to be clear: if you are on the latest commit, does restoring of an "old" backup (done when it was broken) works?

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        msagautam
                                        last edited by msagautam

                                        Are you asking whether I can auto-power on the restored VMs from the latest commit of orchestra?
                                        Answer: Yes, it works!
                                        Reason: Looks like the parameter was not available before and julien-f has fixed it by adding the parameter in this commit: https://github.com/vatesfr/xen-orchestra/commit/e171d8ed0e786772c9ccdb7dd4127d42faae141a
                                        Thank you all!

                                        0 julien-f committed to vatesfr/xen-orchestra
                                        fix(xo-server/vm.set): add `auto_poweron` to params
                                        
                                        Related to b8524732ce5fc466ef73664ff02cd4e09fca7ad9
                                        
                                        Fixes #4295
                                        C 1 Reply Last reply Reply Quote 0
                                        • olivierlambertO Offline
                                          olivierlambert Vates 🪐 Co-Founder CEO
                                          last edited by

                                          Thanks for your feedback 🙂

                                          1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            cg @msagautam
                                            last edited by

                                            @msagautam said in Auto Power ON says Invalid Parameters:

                                            Are you asking whether I can auto-power on the restored VMs from the latest commit of orchestra?

                                            He, without any doubt, wanted to know, if that also works with old backups, which have been created before the fix was submitted. (As of: Are old backups still broken?)

                                            Your answer doesn't say if you power up old (pre fix) or new (post fix) created backups. 😉

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