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

    Using tags or custom fields for VM placement

    Scheduled Pinned Locked Moved Xen Orchestra
    25 Posts 4 Posters 4.9k 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.
    • C Offline
      CJ @olivierlambert
      last edited by

      @olivierlambert Was this ever added to the roadmap?

      I recently had a power failure which took down my entire setup. Upon starting the pool master, I was unable to connect to XO because it had been running on another host. If I had an affinity tag I could set XO to prefer to run on the master.

      This way I could more easily check the status of each thing as I brought it back online. Instead, I had to boot the entire pool because the master thought that XO was still running on the other host.

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

        I'm in a train, almost 3h late and it's the end of the week, so my brain is a bit slow. I'm not sure to understand how XO LB could have help in that context? Remember that VM placement on boot is handled by XAPI, not XO.

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          CJ @olivierlambert
          last edited by

          @olivierlambert No worries. I really was just asking about the status of affinity tags. 🙂

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

            So placement on boot falls under XAPI realm: where to start a VM (eg you have affinity host). But when the VM is up, XAPI won't do anything else, and it's up to the XO LB plugin. If your problem is on boot, then use affinity host setting in XAPI (you can configure it from XO UI). If it's after boot, then we can discuss how to deal with it in XO LB 🙂

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              CJ @olivierlambert
              last edited by

              @olivierlambert The LB plugin is what I'm referring to. I'd like to keep XO on the master but currently there's no way to do that. As you mentioned, if I set boot affinity there's nothing preventing it from getting load balanced to another host.

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

                Okay so to have the LB taking into account the XAPI host affinity if possible, right?

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  CJ @olivierlambert
                  last edited by

                  @olivierlambert I was thinking of tags like the anti-affinity ones but the XAPI host affinity would work as well. I'm not sure if it would work for the OP's use case, though.

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    graham_p
                    last edited by

                    For my original use case, "affinity" isn't quite strong enough. This VM "X" MUST run on a host with tag "Y". If no resource is available on a host with tag Y, don't start X.

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

                      So it's better to NOT have the VM running than running on another host, right?

                      G 1 Reply Last reply Reply Quote 0
                      • G Offline
                        graham_p @olivierlambert
                        last edited by

                        @olivierlambert in my original case - yes.

                        For example, if the VM needs PCI passthrough to a specific device (or very fast network or fast CPU in one or two servers in the larger pool) it is absolutely better not to start the VM, because the VM is useless without this resource.

                        (Like a hard affinity to a tag - not a single host - which takes priority over general softer affinity settings).

                        (I do realise that this is complex and a big ask!)

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

                          It's already the case: you won't be able to boot a VM on another host with hard requirements (like local SR or PCI passthrough). It will simply not boot.

                          G 1 Reply Last reply Reply Quote 0
                          • G Offline
                            graham_p @olivierlambert
                            last edited by

                            @olivierlambert Well we haven't actually got round to using PCI passthrough yet - but even forgetting that for the moment - say I have two servers in a larger pool with mega fast network and fast CPU. How can I guarantee that my special VM always runs on one of these servers? At the moment I believe that I can prefer that they run on one of them but cannot guarantee it.

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

                              The easiest way to guarantee it is to depend on a local resource (local SR or ISO).

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