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

    Restart VM after SR available

    Scheduled Pinned Locked Moved Xen Orchestra
    8 Posts 3 Posters 941 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.
    • C Offline
      cyrus104
      last edited by

      Preface: This system is my homelab and is only production in the sense that it runs my house.

      I am cursed to live in a city that has occasional power outage that last more than my UPS can handle. At this point the whole system shuts down.... and my locally purchased UPS doesn't support NUT or anything like it. I'm looking at ways to solve this with a raspberry pi that is powered by two sources and will host NUT... it's a work in progress.

      All of my VMS are hosted on an NFS share that is much slower to boot than my XCP-ng hosts are and then the VMS never boot up even though they are set to Auto Power On.

      I see there is a start delay but is there a way to have it not boot UNTIL the SR is available?

      Thanks a bunch.

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

        I think I remember this kind of question few years ago 🤔

        So I'm not entirely sure, but I think XCP-ng boot phase isn't complete until all SR are connected. But I have no idea how often SMAPI will try to reconnect until it's up.

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

          @olivierlambert

          I understand it shouldn't really be needed but.... it is for me.

          1 Reply Last reply Reply Quote 0
          • gskgerG Offline
            gskger Top contributor @cyrus104
            last edited by

            @cyrus104 You could change the grub boot delay on your XCP-ng host, so that your host waits longer. Let's say your SR is savely available after 60s, you could set the boot delay to 70s.

            C 1 Reply Last reply Reply Quote 1
            • C Offline
              cyrus104 @gskger
              last edited by

              I'm using TrueNAS for my NFS SR and I searching for a way to control the IPMI/BMC of my XCP-ng hosts. That way once the storage finishes booting, it could send an command to boot the three XCP-ng hosts.

              Something like this could be done with wake on lan but I have IPMI and it's always on and more reliable.

              gskgerG 1 Reply Last reply Reply Quote 0
              • gskgerG Offline
                gskger Top contributor @cyrus104
                last edited by

                @cyrus104 That makes sence. Depending on the IPMI/BMC, you could add an ipmitool -I lanplus -H [Host IP] -U admin -P [admin password] power on for each XCP-ng host into the TrueNAS Init/Shutdown Scripts settings, if your hosts support ipmitool.

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  cyrus104 @gskger
                  last edited by

                  @gskger

                  That's a great idea, I'm hesitant to try it while the system is already on. It should just see the power is on already and ignore it... I was able to get it to work with the power status command for testing.

                  Thanks!

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

                    @gskger, supermicro requires -I open as they don't support RMCP+.

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