Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No pxeboot when power state is "off" #16

Open
Rixillo opened this issue Mar 28, 2017 · 0 comments
Open

No pxeboot when power state is "off" #16

Rixillo opened this issue Mar 28, 2017 · 0 comments

Comments

@Rixillo
Copy link
Contributor

Rixillo commented Mar 28, 2017

I find that the pxeboot command works if the target machine is in "standby", but fails if the machine is in state "off".

I offer the following explanation: the pxeboot command of amtctrl sends two wsman commands to the target machine, first a boot config setting of "PXE", followed by a power state change request of "reboot". I suspect it is not valid to send a "reboot" to a machine that is off.

With the old amttool program, I could branch to handle either state correctly (after initially querying to get power state).

if ($powerstate == 'off') { 
    amttool 10.0.0.xx powerup pxe
} elsif ($powerstate == 'standby') {
    amttool 10.0.0.xx powercycle pxe
}

amtctrl provides pxe-reboot capability, but not pxe-boot.

Below is the (unhandled) error message returned when the target machine was in state "off":

/usr/bin/amtctrl -p  10.0.0.142 pxeboot
<?xml version="1.0" ?>
<a:Envelope xmlns:a="http://www.w3.org/2003/05/soap-envelope" xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:d="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:e="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:f="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:g="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <a:Header>
    <b:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:To>
    <b:RelatesTo>uuid:fc49c92a-8b5d-46e6-a695-e0baca76d80d</b:RelatesTo>
    <b:Action a:mustUnderstand="true">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService/RequestPowerStateChangeResponse</b:Action>
    <b:MessageID>uuid:00000000-8086-8086-8086-000000000047</b:MessageID>
    <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
  </a:Header>
  <a:Body>
    <g:RequestPowerStateChange_OUTPUT>
      <g:ReturnValue>2</g:ReturnValue>
    </g:RequestPowerStateChange_OUTPUT>
  </a:Body>
</a:Envelope>

The return value of 2 is an error code.
(reference: http://www.dmtf.org/sites/default/files/standards/documents/DSP1027_2.0.1.pdf)

@Rixillo Rixillo changed the title pxeboot when power state if off No pxeboot when power state is "off" Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant