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

    Multi step Jobs?

    Scheduled Pinned Locked Moved Xen Orchestra
    featurein backlog
    7 Posts 3 Posters 861 Views 1 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
      markhaines
      last edited by marcungeschikts

      I run a 2 node XCP-NG system as a homelab, the main server runs 24/7, the second server is used for work lab projects and doesn't need to run 24/7 or even every day so I'd like to power it down cleanly to reduce the power costs.

      I've been playing with the Jobs section of XOA and have created two jobs, one which suspends all the VMs and then another which powers the host down.

      Is it possible to combine them into a single job (or maybe a script?) I could trigger to kick off suspend, then once all VMs were suspended power the machine down? At the moment I have to wait around and check back to safely power the host down.

      I spotted the 'Emergency Shutdown' feature, but it doesn't look like I can call that function from a Job? I might want to set this up as a scheduled task so it runs anyway at 11pm or so in case I forget to shut the sytem down manually.

      I'm also trying to figure out how to use the Power-On command to bring it back up again using Dell iDRAC without success so far but probably a topic for another thread..

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

        pinging pdonias or julien-f

        pdoniasP 1 Reply Last reply Reply Quote 0
        • pdoniasP Offline
          pdonias Vates 🪐 XO Team @olivierlambert
          last edited by

          Hi markhaines, thanks for the suggestion!

          We've discussed this and since it's not a trivial feature to implement and since we have quite a lot of other priorities at the moment, we won't be able to do it in the short term. However, we're keeping it in our "nice to have" list and if we get more requests about it, we'll raise its priority.

          In the meantime, we'll add host.emergencyShutdownHost to the list of methods you can use in jobs.

          M 2 Replies Last reply Reply Quote 0
          • M Offline
            markhaines @pdonias
            last edited by

            pdonias Thanks - I think tbh the 'emergency.shutdown' option would do me fine - i've been using that this week 'manually' to shut the server down and it works ok. Is it possible to call this command externally in shell script - i guess it's just using an API call under the hood?

            pdoniasP 1 Reply Last reply Reply Quote 0
            • pdoniasP Offline
              pdonias Vates 🪐 XO Team @markhaines
              last edited by

              markhaines If you need to call xo-server methods in a script, you can use xo-cli.

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                markhaines @pdonias
                last edited by

                pdonias ok, thanks - will have a play!

                1 Reply Last reply Reply Quote 0
                • M Offline
                  markhaines @pdonias
                  last edited by

                  pdonias olivierlambert hey thanks for adding this in latest release!!

                  45658591-208e-46f6-b3af-74144019b94e-CleanShot 2021-07-02 at 19.36.01@2x.png

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