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

    Install XO from sources.

    Scheduled Pinned Locked Moved Xen Orchestra
    45 Posts 11 Posters 14.9k Views 12 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.
    • L
      lem2405 @acebmxer
      last edited by

      @acebmxer Even with the credentials present in the configuration file, the process still prompts for sudo permissions, which will not be visible or actionable when running as a cron job.

      acebmxerA 1 Reply Last reply
      Reply Quote 0
      • acebmxerA
        acebmxer @lem2405
        last edited by acebmxer

        @lem2405

        Sorry for any confusion. Hope this clears it up.

        The credentials in xo-config.cfg are only for logging into Xen Orchestra (the pre-update task check and VM snapshot). There is no setting for a sudo password, and the script won't run as root, so sudo will still ask.

        To run it from cron, the account running the script needs passwordless sudo. Run this as that user:

        echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/xo-cron
        sudo chmod 440 /etc/sudoers.d/xo-cron
        sudo visudo -c
        

        Then add --non-interactive so it doesn't stop to ask anything:

        0 3 * * * cd /path/to/install_xen_orchestra && ./install-xen-orchestra.sh --update --non-interactive
        

        Keep in mind this gives that account full sudo with no password. Use at your own risk.

        I've pushed this to the dev branch, including a new Scheduled Updates (cron) section in the README. To try it before it reaches main, switch your copy to dev:

        cd /path/to/install_xen_orchestra
        git fetch origin
        git checkout dev
        

        To go back later, run git checkout main.

        Scheduled Updates (cron)

        --update can run unattended from cron. Two things are needed:

        1. Passwordless sudo for the account that runs the script. The script
          refuses to run as root and calls sudo throughout, and there is no config
          setting for a sudo password. Run this as that account:

          echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/xo-cron
          sudo chmod 440 /etc/sudoers.d/xo-cron
          sudo visudo -c
          

          This gives the account full sudo with no password.

        2. --non-interactive, so the update never stops to ask anything:

          0 3 * * * cd /path/to/install_xen_orchestra && ./install-xen-orchestra.sh --update --non-interactive >> "$HOME/xo-update.log" 2>&1
          

        Set XO_API_TOKEN (or the user/password pair) in xo-config.cfg.
        Without it, a non-interactive run skips the
        running task check instead of
        prompting for credentials.

        L 1 Reply Last reply
        Reply Quote 1
        • L
          lem2405 @acebmxer
          last edited by

          @acebmxer Thank you for your help and prompt response. I truly appreciate it!

          acebmxerA 1 Reply Last reply
          Reply Quote 0
          • acebmxerA
            acebmxer @lem2405
            last edited by

            @lem2405

            No problem. Let me know if you still encounter any issues.

            1 Reply Last reply
            Reply Quote 0
            • acebmxerA
              acebmxer
              last edited by

              Update - changes are live in the dev branch now.

              So figured out the update / switching branches for the proxy by connecting the proxy to my xoa free account. That triggered the available update to next version. From there I found the command that needs to be ran on the proxy to switch back and forth...

              Screenshot_20261009_143546.png

              Latest branch

              Screenshot_20261009_144414.png

              stable branch

              Screenshot_20261008_202716.png

              Backup job ran sucessful.

              2026-10-09T17_48_25.447Z - backup NG.txt

              After the proxy has been deployed...

              The proxy has been registered with your Xen Orchestra instance.
              You can manage it from the Xen Orchestra web interface.

              Next: register the proxy's updater and move it to the 'latest' channel.

              1. On the pool master (IP), set a password for the proxy's 'xoa' user
                (choose your own) and reboot the proxy VM:
                xe vm-param-set uuid=UUID xenstore-data:vm-data/system-account-xoa-password='<your password>'
                xe vm-reboot uuid=UUID
              2. SSH to the proxy as 'xoa' (IP) and run:
                sudo xoa-updater register - This registers it with your vates account.
                sudo xoa-updater configure-channel xo-proxy-appliance-latest - set to latest or stable
                sudo xoa-updater upgrade - This can be ran via the UI or this command. Both need to be done twice to do the upgrade and/or downgrade.
                register needs a free xen-orchestra.com account; see the README.

              And host connected via proxy.

              Screenshot_20261009_150011.png

              1 Reply Last reply
              Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post