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

    Power on function

    Scheduled Pinned Locked Moved Xen Orchestra
    52 Posts 4 Posters 9.8k Views 2 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.
    • olivierlambertO Offline
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by

      Old blog post but relevant: https://xen-orchestra.com/blog/how-to-use-wake-on-lan-on-xenserver-6-2/

      You need to configure your hosts for that feature to work 🙂

      1 Reply Last reply Reply Quote 1
      • D Offline
        dsiminiuk
        last edited by

        You're funny. The very first comment by "Ringo" on that very thread is me. I wasn't able to get that to work so "Xen Orchestra" told me to me post here. Round and round I go.

        But I'll try again just for posterity.

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

          And how can I guess that? There's absolutely 0 info on your initial post here.

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

            Anyway, XO is using calling host.power_on method from XAPI (cf https://xapi-project.github.io/xen-api/classes/host.html).

            edit: I don't see that feature/call deprecated in XAPI, so please share the full context here (command tried, output result etc.). Nobody could even guess you are the same person, nor the context. Maybe you forgot to post some stuff with it 😄

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

              Also, our official doc point to the xe reference guide, where you could find the host-set-power-mode parameters details: https://docs.citrix.com/en-us/citrix-hypervisor/command-line-interface.html#host-set-power-on-mode

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

                I got my master server set through XCP-ng Center to see what the params look like in xe host-list params=all

                                         power-on-mode ( RO): iLO
                                       power-on-config (MRO): power_on_ip: 192.168.1.44; power_on_user: Administrator; power_on_password_secret: 94171423-9ac2-beac-6b87-81699a0a7de6
                

                I don't see a way to set these params in XO and if I wanted to set them from the xe CLI, I don't know how I would hash the password.

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

                  This is also in the doc I linked previously: https://docs.citrix.com/en-us/citrix-hypervisor/command-line-interface.html#secrets

                  However, I never used that myself. Due to the low demand, we never exposed this power on feature entirely in XO, but time will come when we'll do it 🙂

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

                    FYI, I took time to write xe CLI reference guide for XCP-ng too:

                    https://xcp-ng.org/docs/cli_reference.html#secrets

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

                      I also found the "xe secret-create value=my-password" to produce the UUID in the doc.

                      Now iLO is configured on the master for both of my hosts.

                      I am unable to kill/cancel the previous power on attempt from XO web.

                      Async.host.power_on (on xcpng01) 0%
                      

                      Is there a way to clear this?

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

                        Restart the toolstack on the master 🙂

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

                          Restarting the toolstack from XO or XCP-ng didn't clear it.

                          I'm manually powering up host 2 to migrate all VMs and change the pool master so I can reboot host1.

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

                            The unresolved task disappeared once host2 became available.

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

                              Now that host1 is powered off.

                              Parameters seem ok.

                              power-on-mode ( RO): iLO
                              power-on-config (MRO): power_on_ip: 192.168.1.44; power_on_user: Administrator; power_on_password_secret: 94171423-9ac2-beac-6b87-81699a0a7de6

                              Run...

                              xe host-power-on host=cdb42b94-7ec6-47b4-aaef-d4c52f6bd7b3

                              The cursor sits at column 1 after the newline from the command and never times out.

                              I know this isn't an XO problem, but in case somebody else gets this far...

                              From the xensource.log

                              May 14 11:06:45 xcpng02 xapi: [ info||5026 UNIX /var/lib/xcp/xapi||cli] xe host-power-on host=cdb42b94-7ec6-47b4-aaef-d4c52f6bd7b3 username=root password=(omitted)
                              May 14 11:06:45 xcpng02 xapi: [ info||5026 UNIX /var/lib/xcp/xapi|session.login_with_password D:880acf326f2a|xapi] Session.create trackid=981ff975a6b71268bf97af6cf52b6c96 pool=false uname=root originator=cli is_local_superuser=true auth_user_sid= parent=trackid=9834f5af41c964e225f24279aefe4e49
                              May 14 11:06:45 xcpng02 xapi: [debug||5027 UNIX /var/lib/xcp/xapi||dummytaskhelper] task dispatch:pool.get_all D:f5013af2302b created by task D:880acf326f2a
                              May 14 11:06:45 xcpng02 xapi: [debug||5026 UNIX /var/lib/xcp/xapi|host.power_on R:97714a622dc3|audit] Host.power_on: host = 'cdb42b94-7ec6-47b4-aaef-d4c52f6bd7b3 (xcpng01)'
                              May 14 11:06:45 xcpng02 xapi: [debug||5029 UNIX /var/lib/xcp/xapi||dummytaskhelper] task dispatch:session.logout D:aea00adbbc6a created by task D:5292ea4ccdb8
                              May 14 11:06:45 xcpng02 xapi: [ info||5029 UNIX /var/lib/xcp/xapi|session.logout D:d10858afe74a|xapi] Session.destroy trackid=220441f1f21a1564d410801d86460ab1
                              May 14 11:06:45 xcpng02 xapi: [debug||5030 UNIX /var/lib/xcp/xapi||dummytaskhelper] task dispatch:session.slave_login D:2b34221718c5 created by task D:5292ea4ccdb8
                              May 14 11:06:45 xcpng02 xapi: [ info||5030 UNIX /var/lib/xcp/xapi|session.slave_login D:0072d08cd959|xapi] Session.create trackid=00f2456aa8d5ace26679a22fad62c265 pool=true uname= originator=xapi is_local_superuser=true auth_user_sid= parent=trackid=9834f5af41c964e225f24279aefe4e49
                              

                              I'm going to have to get into tcpdump to find out what is going on there.

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

                                Are you trying to power on the master? If yes, it won't work, only the master can boot slaves.

                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  dsiminiuk @olivierlambert
                                  last edited by

                                  @olivierlambert No, I'm on the master trying to power on the slave.

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

                                    Async.host.power_on  (on xcpnghost1) 0%
                                    

                                    Persists in the web UI Tasks panel no matter what I do.
                                    Restarted toolstack,
                                    Shut down the entire environment and restarted.
                                    No way to cancel it or delete it.

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

                                      Are you sure it's not a XO refresh issue?

                                      D 1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        dsiminiuk @olivierlambert
                                        last edited by

                                        @olivierlambert It's been there since I played with power on function that failed.

                                        Where is this task event stored? On the master? On XO?

                                        How can I query it from a command line?

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

                                          xe task-list on any pool member

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

                                            @olivierlambert said in Power on function:

                                            xe task-list

                                            Oh, that was too easy. There it is.

                                            uuid ( RO)                : e1896255-fbec-76d6-c2f4-9c2829c1f72b
                                                      name-label ( RO): Async.host.power_on
                                                name-description ( RO):
                                                          status ( RO): pending
                                                        progress ( RO): 0.000
                                            
                                            xe task-cancel uuid=e1896255-fbec-76d6-c2f4-9c2829c1f72b
                                            

                                            Doesn't cancel it.

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