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

    Question about "auto power on"

    Scheduled Pinned Locked Moved Management
    12 Posts 5 Posters 449 Views 4 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.
    • cairotiC Offline
      cairoti
      last edited by

      Hello. I'm trying to configure VMs in a pool to start automatically in XCP-ng. Is it possible to define a boot order for VMs in XOA?

      Link I consulted:

      https://docs.xcp-ng.org/guides/autostart-vm/

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        DustinB @cairoti
        last edited by DustinB

        @cairoti yes, you can set the boot delay or use the vAPP settings to configure this. (looking for the link)

        https://docs.xcp-ng.org/appendix/cli_reference/#appliance-commands

        cairotiC 1 Reply Last reply Reply Quote 0
        • D Offline
          DustinB
          last edited by

          By default, no VMs automatically boot, if you enable automatic boot, the default delay is 0 seconds.

          So if you have 3 VMs

          VM1: XO/XOA/XOCE 0 second delay
          VM2: Domain Controller 30 second delay
          VM3: File Server 60 second delay

          Everything else might not automatically boot, but that is the simplest way to do this

          cairotiC 1 Reply Last reply Reply Quote 0
          • cairotiC Offline
            cairoti @DustinB
            last edited by

            @DustinB Thanks for your reply. I will try to use the "delay" time.

            1 Reply Last reply Reply Quote 0
            • cairotiC Offline
              cairoti @DustinB
              last edited by cairoti

              @DustinB I have it set up like this:

              VM1: 0 seconds delay
              VM2: 90 seconds delay
              VM3: 150 seconds delay

              However, in the test, VM1 started and then VM3. VM2 took longer to start.

              I would like to set the times large because some VMs communicate with services on other VMs, so the order is important.

              See the configuration:

              1.png

              2.png

              3.png

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                DustinB @cairoti
                last edited by

                @cairoti said in Question about "auto power on":

                However, in the test, VM1 started and then VM3. VM2 took longer to start.

                This boot order would be if the host lost power and then came up online. You might be better able to use the Jobs function of XO and XAPI to force the start order, but I haven't had a need to do this yet.

                You'd be using xapi functions to start VMs or stop other VMs in specific orders.

                cairotiC 1 Reply Last reply Reply Quote 0
                • cairotiC Offline
                  cairoti @DustinB
                  last edited by

                  @DustinB I would like the VMs to boot automatically and in order when the servers are powered on.

                  Do you know if there is any material about Jobs on the XO, for starting VMs?

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    karlisi
                    last edited by

                    https://docs.xen-orchestra.com/advanced#job-manager

                    cairotiC 1 Reply Last reply Reply Quote 0
                    • cairotiC Offline
                      cairoti @karlisi
                      last edited by cairoti

                      @karlisi To test I created 3 schedules to start 3 VMs respectively. My goal was to test the startup order. Afterwards I restarted the XO VM. I noticed that the VMs start earlier than expected. How does the XO time the VMs?

                      In job I did not define timeout. Below are the schedules for each VM.

                      2025-02-07_19-13.png

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        Davidj 0
                        last edited by

                        @cairoti
                        You might look at "Appliances".
                        The startup delay on the VM doesn't apply when the host is booting, only when you run "xe vm-start".

                        Look at
                        https://xcp-ng.org/forum/topic/6464/resolved-vm-s-auto-starting-in-wrong-order
                        and
                        https://xcp-ng.org/forum/topic/1312/vm-start-delay-does-it-work-yet/5

                        cairotiC 1 Reply Last reply Reply Quote 0
                        • cairotiC Offline
                          cairoti @Davidj 0
                          last edited by cairoti

                          @Davidj-0 From what I understand, the xcp host must already be turned on. The VM will only start at the defined time, when for some reason, it has been turned off previously.

                          My plan was to have the servers power up when they received power. Then the "auto power on" XOCE VM would start and, via scheduling, power on other VMs in a predefined order.

                          Does the "Appliances" feature only exist in the XCP-ng command line or in the XCP-ng Center?

                          According to this link this feature does not exist on XO: https://xcp-ng.org/forum/topic/6311/managing-vapps-with-xoa

                          rpc-scandinaviaR 1 Reply Last reply Reply Quote 0
                          • rpc-scandinaviaR Offline
                            rpc-scandinavia @cairoti
                            last edited by

                            @cairoti, I think the VMs are restarted in their natural name order. I prefix mine with 00, 01, 10, 11, 20, 21, 22 etc., to control the start order.

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