Power on function


  • XCP-ng Team

    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 😄


  • XCP-ng Team

    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



  • 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.


  • XCP-ng Team

    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 🙂


  • XCP-ng Team

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

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



  • 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?


  • XCP-ng Team

    Restart the toolstack on the master 🙂



  • 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.



  • The unresolved task disappeared once host2 became available.



  • 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.


  • XCP-ng Team

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



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


Log in to reply
 

XCP-ng Pro Support

XCP-ng Pro Support