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

PXE Setting for Network Interface are not exposed in Bios settings for all tested servers #56

Open
GR360RY opened this issue Mar 12, 2018 · 25 comments

Comments

@GR360RY
Copy link

GR360RY commented Mar 12, 2018

PxeDev1EnDis is not exposed in Bios Setting for Gen12, 13 and 14 Platforms.
When attempting the enable PXE mode for an Integrated NIC the following errors appears:

ansible-playbook 2.4.3.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
Parsed localhost, inventory source with host_list plugin

PLAYBOOK: enable_pxe.yml *************************************************************************************************************************************************************
1 plays in enable_pxe.yml

PLAY [Enable PXE in NICs] ************************************************************************************************************************************************************
META: ran handlers

TASK [Enable PXE Boot for NIC1] ******************************************************************************************************************************************************
task path: /root/idrac-ansible-module/enable_pxe.yml:12
Using module file /root/idrac-ansible-module/library/redfish.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~ && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562 `" && echo ansible-tmp-1520841276.2-87132249353562="` echo /root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562 `" ) && sleep 0'
<localhost> PUT /tmp/tmpa1ql9Q TO /root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562/redfish.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562/ /root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562/redfish.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562/redfish.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1520841276.2-87132249353562/" > /dev/null 2>&1 && sleep 0'
fatal: [localhost -> localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "baseuri": "xxx.xxx.xxx.xxx",
            "bios_attr_name": "PxeDev1EnDis",
            "bios_attr_value": "Enabled",
            "bootdevice": null,
            "category": "System",
            "command": "SetBiosAttributes",
            "mgr_attr_name": null,
            "mgr_attr_value": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "user": "root",
            "userid": null,
            "username": null,
            "userpswd": null,
            "userrole": null
        }
    },
    "msg": "Not supported on this platform"
}
...ignoring
META: ran handlers
META: ran handlers

PLAY RECAP ***************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0

This was tested on Dell R720, R730 and R740 with a different set of Daughter Cards ( Intel, Qlogic and Broadcom ). My Broadcom chipset is different then the one that was used in your sample server. In all cases Attributes dict in https://host/redfish/v1/Systems/System.Embedded.1/Bios/ endpoint doesn't have the PxeDev1EnDis Attribute. Attempting to apply the values manually with curl at https://host/redfish/v1/Systems/System.Embedded.1/Bios/Settings/ results in error :)

Example output from Dell R740:

"Attributes": {
...
"OppSrefEn": "Disabled",
"OsWatchdogTimer": "Disabled",
"PasswordStatus": "Unlocked",
"PcieAspmL1": "Enabled",
"PowerCycleRequest": "None",
"Proc1Brand": "Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz",
"Proc1Id": "6-55-4",
"Proc1L2Cache": "14x1 MB",
"Proc1L3Cache": "19712 KB",
"Proc1NumCores": 14,
"Proc1TurboCoreNum": "All",
"Proc2Brand": "Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz",
"Proc2Id": "6-55-4",
"Proc2L2Cache": "14x1 MB",
"Proc2L3Cache": "19712 KB",
"Proc2NumCores": 14,
"Proc2TurboCoreNum": "All",
"ProcAdjCacheLine": "Enabled",
"ProcBusSpeed": "10.40 GT/s",
"ProcC1E": "Enabled",
"ProcCStates": "Enabled",
"ProcCoreSpeed": "2.20 GHz",
"ProcCores": "All",
"ProcHwPrefetcher": "Enabled",
"ProcPwrPerf": "SysDbpm",
"ProcTurboMode": "Enabled",
"ProcVirtualization": "Enabled",
"ProcX2Apic": "Disabled",
"PwrButton": "Enabled",
"RedirAfterBoot": "Enabled",
"RedundantOsLocation": "None",
"SataPortA": "Auto",
"SataPortACapacity": "N/A",
...

Tested on the following hardware:

  1. R740 with BRCM 2P 25G SFP rNDC
  2. R740 with QLogic 1G+10GE QL41264HMCU CNA
  3. R730 with Intel(R) 2P X520/2P I350 rNDC
  4. R720 with Intel(R) 2P X540/2P I350 rNDC

@jose-delarosa , any chance you tested this functionality on any other combination of hardware and Daughter Cards ?

@jose-delarosa
Copy link
Contributor

@GR360RY, the Redfish APIs that get/set BIOS attributes are only available in 14G. For 12G/13G, you should see an error message during playbook execution:

TASK [Get attributes] **********************************************************
ok: [r740 -> localhost]
fatal: [m620 -> localhost]: FAILED! => {"changed": false, "msg": "Not supported on this platform"}
...ignoring
fatal: [r630 -> localhost]: FAILED! => {"changed": false, "msg": "Not supported on this platform"}
...ignoring

With 14G servers, I did not test with every available card that's supported in every server. But the parameter should be available in 14G.

@texroemer
Copy link

texroemer commented Mar 21, 2018

BIOS PXE attributes are only supported when BIOS boot mode is set to UEFI. When BIOS is in BIOS boot mode, PXE attributes will be suppressed and you will not see them. You can see the same behavior in F2 Setup. When BIOS is in BIOS boot mode, you will not see Network Settings group which contains the PXE attributes for UEFI.

On 13G, BIOS added new support for how it handles PXE. When BIOS boot mode is set to BIOS, network card controls PXE support so if you enable PXE for a NIC port in Device Settings, reboot the server, it will now show NIC PXE entry in the BIOS boot order. When BIOS boot mode is set to UEFI, BIOS now controls PXE boot which is why you see PXE attributes. If you go into F2 Device Settings and enable PXE on a NIC port, reboot the server and check UEFI boot order, you will not see a boot entry. You have to go into BIOS network settings and configure PXE attributes which will then expose a PXE NIC entry in the UEFI boot order. This same behavior also exists on 14G BIOS.

On iDRAC 8, if you have latest 2.52 version installed, Redfish now supports GET / PATCH for BIOS attributes.

@GR360RY
Copy link
Author

GR360RY commented Mar 21, 2018

@texroemer , big thanks for the clarification. I will check this out and update the ticket.

@patriziobassi
Copy link

Hi, i have a R730 in UEFI mode and i can see:

"PxeDev1EnDis": "Enabled",
"PxeDev1Interface": "NIC.Integrated.1-1-1",
"PxeDev1Protocol": "IPv4",
"PxeDev1VlanEnDis": "Disabled",
"PxeDev1VlanId": 1,
"PxeDev1VlanPriority": 0,
"PxeDev2EnDis": "Disabled",
"PxeDev2Interface": "NIC.Integrated.1-1-1",
"PxeDev2Protocol": "IPv4",
"PxeDev2VlanEnDis": "Disabled",
"PxeDev2VlanId": 1,
"PxeDev2VlanPriority": 0,
"PxeDev3EnDis": "Disabled",
"PxeDev3Interface": "NIC.Integrated.1-1-1",
"PxeDev3Protocol": "IPv4",
"PxeDev3VlanEnDis": "Disabled",
"PxeDev3VlanId": 1,
"PxeDev3VlanPriority": 0,
"PxeDev4EnDis": "Disabled",
"PxeDev4Interface": "NIC.Integrated.1-1-1",
"PxeDev4Protocol": "IPv4",
"PxeDev4VlanEnDis": "Disabled",
"PxeDev4VlanId": 1,
"PxeDev4VlanPriority": 0,

the server as an extra pciexpress card 2x10G. We would like to boot PXE from those (actually setting the vlan too). It looks like those parameters are not exposed for 13G. Any workaround?

@texroemer
Copy link

texroemer commented Jun 1, 2018

Hi,

Yes, this is supported and you can configure any NIC port on your server to PXE boot in UEFI mode. The attributes you want to use are: PxeDev1EnDis and PxeDev1Interface. PxeDev1EnDis will enable device 1 for PXE boot in the BIOS and for PxeDev1Interface, you will set this to the NIC port FQDD string you want to PXE boot to.

To get supported and correct possible NIC port FQDD string values, view the BIOS attribute registry:

"redfish/v1/Systems/System.Embedded.1/Bios/BiosRegistry"

In the example below using Redfish with Powershell cmdlet, i'm going to:

  • Enable PxeDev1EnDis
  • Set PxeDev1Interface to "NIC.Slot.1-1-1"
  • Enable PxeDev1VlanEnDis
  • Set PxeDev1VlanId to 101

PS C:> Set-MultipleBIOSAttributesREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_password
calvin -file_path C:\Users\Documents\WindowsPowerShell\Modules\Set-MultipleBIOSAttributesREDFISH

  • WARNING, attribute PxeDev1EnDis current value is: Disabled, setting pending value to: Enabled

  • WARNING, attribute PxeDev1VlanId current value is: 1, setting pending value to: 101

  • WARNING, attribute PxeDev1Interface current value is: NIC.Integrated.1-1-1, setting pending value to: NIC.Slot.1-1-1

  • WARNING, attribute PxeDev1VlanEnDis current value is: Disabled, setting pending value to: Enabled

  • PASS, statuscode 200 returned to successfully set attributes pending value

  • PASS, statuscode 200 returned to successfully create job: JID_278587953413

  • PASS, JID_278587953413 job ID marked as scheduled

  • PASS, statuscode 204 returned successfully to power OFF the server

  • PASS, statuscode 204 returned successfully to power ON the server

  • WARNING, cmdlet will now poll job ID every 15 seconds until marked completed

  • WARNING, current job status is: Task successfully scheduled.

  • WARNING, current job status is: Task successfully scheduled.

  • WARNING, current job status is: Task successfully scheduled.

  • WARNING, current job status is: Task successfully scheduled.

  • WARNING, current job status is: Task successfully scheduled.

  • WARNING, current job status is: Job in progress.

  • WARNING, current job status is: Job in progress.

  • WARNING, current job status is: Job in progress.

  • WARNING, current job status is: Job in progress.

  • WARNING, current job status is: Job in progress.

  • WARNING, current job status is: Job in progress.

  • WARNING, current job status is: Job completed successfully.

  • PASS, JID_278587953413 job ID marked as completed!
    Job completed in @{Minutes=8; Seconds=31}

  • PASS, statuscode 200 returned successfully to get attributes

  • PASS, attribute PxeDev1EnDis current value is successfully set to: Enabled

  • PASS, attribute PxeDev1VlanEnDis current value is successfully set to: Enabled

  • PASS, attribute PxeDev1Interface current value is successfully set to: NIC.Slot.1-1-1

  • PASS, attribute PxeDev1VlanId current value is successfully set to: 101
    PS C:>

@patriziobassi
Copy link

that's great it's working for me.

Do you know how to get the mac address of external slot/ports too? with System inventory i could only find those of integrated eth ports

@patriziobassi
Copy link

Actually i was wrong:

        {
            "AutoNeg": false,
            "FQDN": null,
            "Health": "OK",
            "MACAddress": "F4:E9:xx:xx:xx:x",
            "MTU": null,
            "Name": "System Ethernet Interface",
            "SpeedMbps": 0,
            "State": "StandbyOffline"
        },

the name is always System Ethernet Interface even with external pci-e cards and the speed is always 0.

i would like to get my external 10G cards mac address only

@texroemer
Copy link

texroemer commented Jun 4, 2018

@patriziobassi

GET on URI "redfish/v1/Systems/System.Embedded.1/EthernetInterfaces" will return URIs for all network devices detected. Execute GET on one of these URIs to get the MAC address for that specific port.

Example of output using GET command on URI "redfish/v1/Systems/System.Embedded.1/EthernetInterfaces":

@odata.context "/redfish/v1/$metadata#EthernetInterfaceCollection.EthernetInterfaceCollection"
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces"
@odata.type "#EthernetInterfaceCollection.EthernetInterfaceCollection"
Description "Collection of Ethernet Interfaces for this System"
Members  
0  
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Integrated.1-3-1"
1  
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Integrated.1-4-1"
2  
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Integrated.1-1-1"
3  
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Integrated.1-2-1"
4  
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Slot.2-1-1"
5  
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Slot.2-2-1"
[email protected] 6
Name "System Ethernet Interface Collection"

Example of output using GET command on URI "redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Slot.2-1-1":

@odata.context "/redfish/v1/$metadata#EthernetInterface.EthernetInterface"
@odata.id "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Slot.2-1-1"
@odata.type "#EthernetInterface.v1_0_2.EthernetInterface"
AutoNeg false
Description "NIC in Slot 2 Port 1 Partition 1"
FQDN null
FullDuplex false
HostName null
IPv4Addresses []
[email protected] 0
IPv6AddressPolicyTable []
[email protected] 0
IPv6Addresses []
[email protected] 0
IPv6DefaultGateway null
IPv6StaticAddresses []
[email protected] 0
Id "NIC.Slot.2-1-1"
InterfaceEnabled null
MACAddress "00:0A:F7:5D:7A:70"
MTUSize null
MaxIPv6StaticAddresses null
Name "System Ethernet Interface"
NameServers []
[email protected] 0
PermanentMACAddress "00:0A:F7:5D:7A:70"
SpeedMbps 0
Status  
Health "OK"
State "StandbyOffline"
UefiDevicePath "PciRoot(0x1)/Pci(0x3,0x2)/Pci(0x0,0x0)"
VLAN null

@patriziobassi
Copy link

Fine, it's ok, but problem is that in the web idrac i see "NIC Slot 4: BRCM 10GbE 2P 57810S Adapter"
so i can reconize it as 10g card.

while here the SpeedMbps is always 0 and name "System Ethernet Interface" i can't distinguish.
another issue is that the card link is shown as Down (while the eth switch says it's up).

I tried in uefi and bios mode too, i can see:

Start PXE over IPv4
PXE-E18: Server response timeout

infact my dhcp server didn't get any requests.
i have a Broadcom BCM57810 10G card

it looks like http://www.dell.com/support/article/it/it/itbsdt1/sln302773/bcm57800s-or-bcm57810-network-link-status-down-state-in-lcc-after-firmware-update-to-080725?lang=en

If i install a Linux OS and set interface up i can see the link going up even in the idrac web gui.
So it looks like the bios is not enabling the link

Link connection
Link Status Down
Link Speed None
OS Driver State Operational
Auto Negotiation Disabled

any settings i'm missing or "just" a critical bug?

@texroemer
Copy link

Current shipping iDRAC 7/8 2.52 version with Redfish, support is not there yet to get the Model name but will be there for next release 2.60 which is going to be posted Q2 of this year (June / July time frame). Once 2.60 is released, execute GET on URI "redfish/v1/Systems/System.Embedded.1/NetworkAdapters/{your network device}" will return the model name.

For link status showing down with certain version of NIC FW, you hit the issue as you posted the link from Dell support site. Can you update to latest NIC FW which is 14.04.18 from Dell Support Site and see if issue has been resolved? I have 14.04.18 FW installed with no OS on my R730 and iDRAC is reporting the link status as up.

@overpud
Copy link

overpud commented Jul 20, 2018

So, is there a way to see PXE NIC using Boot Mode Bios?

@texroemer
Copy link

texroemer commented Jul 20, 2018

When the server is in BIOS boot mode, the network device handles PXE boot configuration. Attribute LegacyBootProtocol will be exposed by the network device. Redfish schema doesn't expose this attribute but you can get this setting using Dell Server Configuration Profile (SCP) feature with Redfish. You can export only the NIC attributes and under each FQDD entry, you will see this attribute setting.

Example below is NIC FQDD entry from SCP export file showing LegacyBootProtocol attribute:

<Component FQDD="NIC.Integrated.1-4-1">
    <Attribute Name="BlnkLeds">0</Attribute>
    <!-- <Attribute Name="VirtMacAddr">00:00:00:00:00:00</Attribute>-->
    **<Attribute Name="LegacyBootProto">PXE</Attribute>**
    <Attribute Name="LnkSpeed">AutoNeg</Attribute>
    <Attribute Name="WakeOnLan">Disabled</Attribute>
    <!-- <Attribute Name="VLanId">0</Attribute>-->
    <Attribute Name="TcpIpViaDHCP">Enabled</Attribute>
    <Attribute Name="IscsiViaDHCP">Enabled</Attribute>
    <Attribute Name="ChapAuthEnable">Disabled</Attribute>
    <!-- <Attribute Name="ChapMutualAuth">Disabled</Attribute>-->
    <!-- <Attribute Name="IscsiInitiatorIpAddr">0.0.0.0</Attribute>-->
    <!-- <Attribute Name="IscsiInitiatorSubnet">0.0.0.0</Attribute>-->
    <!-- <Attribute Name="IscsiInitiatorGateway">0.0.0.0</Attribute>-->
    <!-- <Attribute Name="IscsiInitiatorName"></Attribute>-->
    <!-- <Attribute Name="IscsiInitiatorChapId"></Attribute>-->
    <!-- <Attribute Name="IscsiInitiatorChapPwd"></Attribute>-->
    <!-- <Attribute Name="FirstTgtIpAddress">0.0.0.0</Attribute>-->
    <!-- <Attribute Name="FirstTgtTcpPort">3260</Attribute>-->
    <!-- <Attribute Name="FirstTgtBootLun">0</Attribute>-->
    <!-- <Attribute Name="FirstTgtIscsiName"></Attribute>-->
    <!-- <Attribute Name="FirstTgtChapPwd"></Attribute>-->
</Component>

@vvaldez
Copy link

vvaldez commented Sep 15, 2020

Are there any plans to expose this via redfish for bios settings or is the best way handle this through scp?

@texroemer
Copy link

Hi @vvaldez

There are plans to add setting these individual network attributes using PATCH operation in future iDRAC releases but this won't be until sometime next year (exact release date has not be identified yet).

Thanks

@vvaldez
Copy link

vvaldez commented Sep 15, 2020

@texroemer thank you.

For now we're going to use SCP but one thing I wonder if it's possible to automate changing the boot setting to UEFI to expose PXE setting, change as desired, then change it back? I would assume the network devices would have the configuration thus available in BIOS boot mode. This would take quite a while with all the reboots but we may be OK with that as it can be fully automated.

Thanks again for all your help with redfish and idrac, you always sort as the top thorough answer when we encounter issues on our Dell systems.

@texroemer
Copy link

Hi @vvaldez

The workflow you requested would not work switching back and forth between boot modes.

In BIOS boot mode, PXE configuration is controlled by the network card itself, BIOS does not have any control except it can disable the card.
In UEFI boot mode, BIOS controls PXE configuration but it also must be enabled for PXE on the card itself which is a 2 step process. Even though in BIOS setup you enable PXE device 1 as an example, you still have to set legacy boot protocol on the network port to PXE boot for it to work. This is where SCP simplifies the workflow, you can execute one POST call where it enables PXE device 1, set port 1 as PXE device 1 in BIOS, set network card legacy boot protocol to PXE for port 1.

See example below where i use SCP import buffer to pass in the JSON body locally without using an SCP file to set these attributes.

JSON body for POST:

{"ShareParameters":{"Target":"ALL"},"ImportBuffer":"<SystemConfiguration><Component FQDD=\"BIOS.Setup.1-1\"><Attribute Name=\"PxeDev1EnDis\">Enabled</Attribute><Attribute Name=\"PxeDev1Interface\">NIC.Integrated.1-1-1</Attribute></Component><Component FQDD=\"NIC.Integrated.1-1-1\"><Attribute Name=\"LegacyBootProto\">PXE</Attribute></Component></SystemConfiguration>"}


C:\Python38-32>ImportSystemConfigurationLocalREDFISH.py -ip 192.168.0.120 -u root -p calvin

- JID_002167277458 successfully created for ImportSystemConfiguration method

- INFO, JobStatus not completed, current status: "Importing Server Configuration Profile.", percent complete: "10"
- INFO, JobStatus not completed, current status: "Waiting for the system to shut down.", percent complete: "20"
- INFO, JobStatus not completed, current status: "Waiting for the system to shut down.", percent complete: "20"
- INFO, JobStatus not completed, current status: "Waiting for the system to shut down.", percent complete: "20"
- INFO, JobStatus not completed, current status: "Applying configuration changes.", percent complete: "20"
- INFO, JobStatus not completed, current status: "Applying configuration changes.", percent complete: "20"
- INFO, JobStatus not completed, current status: "Applying configuration changes.", percent complete: "20"
- INFO, JobStatus not completed, current status: "Updating component configuration.", percent complete: "31"
- INFO, JobStatus not completed, current status: "Updating component configuration.", percent complete: "55"
- INFO, JobStatus not completed, current status: "Updating component configuration.", percent complete: "66"
- INFO, JobStatus not completed, current status: "Updating component configuration.", percent complete: "66"
- INFO, JobStatus not completed, current status: "Updating component configuration.", percent complete: "90"
- INFO, JobStatus not completed, current status: "Staged component configuration is complete.", percent complete: "99"
- INFO, JobStatus not completed, current status: "Staged component configuration is complete.", percent complete: "99"
- INFO, JobStatus not completed, current status: "Staged component configuration is complete.", percent complete: "99"

- PASS, job ID JID_002167277458 successfully marked completed

- Detailed configuration changes and job results for "JID_002167277458"

@odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults
DisplayValue: BootMode
Name: BootMode
NewValue: Uefi
OldValue: Uefi
Severity: OK
Status: Success


@odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults
DisplayValue: PxeDev1EnDis
Name: PxeDev1EnDis
NewValue: Enabled
OldValue: Disabled
Severity: OK
Status: Success


@odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults
DisplayValue: LegacyBootProto
Name: LegacyBootProto
NewValue: PXE
OldValue: NONE
Severity: OK
Status: Success


Message: Successfully imported and applied Server Configuration Profile.
MessageArgs: []
[email protected]: 0
MessageId: SYS053


- JID_002167277458 completed in: 0:05:08

@TrevorSquillario
Copy link

Hi @vvaldez

There are plans to add setting these individual network attributes using PATCH operation in future iDRAC releases but this won't be until sometime next year (exact release date has not be identified yet).

Thanks

+1 for this feature

Would like to be able to set LegacyBootProto=PXE on a NIC Component (Example: NIC.Slot.1-1-1) via Redfish using the Manager Attributes.

@Alex-Bron
Copy link

Is there any status update on this patch feature? As our new servers only have x710 10G cards and need to PXE boot from them, I need to set the LegacyBootProto=PXE via Redfish so that I can also add the x710 cards to the BootOrder.

@texroemer
Copy link

Hi @Alex-Bron

Yes this is now supported in iDRAC version 5.00.10 and newer. Python and Powershell cmdlets also have also been posted to GitHub for this support.

Example below of using Python script to set LegacyBootProto to PXE for NIC.Embedded.1-1-1.

C:\Python39>GetSetOemNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin -a NIC.Embedded.1-1-1 -A LegacyBootProto

Attribute Name: LegacyBootProto, Attribute value: NONE

C:\Python39>GetSetOemNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin -s NIC.Embedded.1-1-1 -an LegacyBootProto -av PXE -r y

- INFO, script will be setting network attribute(s) -

Attribute Name: LegacyBootProto, setting new value to: PXE

- PASS: PATCH command passed to set network attribute pending values and create next reboot config job, status code 202 returned

- PASS, JID_389904483460 next reboot config JID successfully created

- INFO: JobStatus not scheduled, current status is: New
- PASS, JID_389904483460 job id successfully scheduled

- INFO, user selected to reboot the server now to execute the job ID.

- INFO, Current server power state is: On
- PASS, POST command passed to gracefully power OFF server, status code return is 204
- INFO, script will now verify the server was able to perform a graceful shutdown. If the server was unable to perform a graceful shutdown, forced shutdown will be invoked in 5 minutes
- INFO, unable to perform graceful shutdown, server will now perform forced shutdown
- PASS, POST command passed to perform forced shutdown, status code return is 204
- PASS, GET command passed to verify forced shutdown was successful and server is in OFF state
- PASS, Command passed to power ON server, status code return is 204
- INFO, JobStatus not completed, current status: "Task successfully scheduled.", execution time: "0:00:18"
- INFO, JobStatus not completed, current status: "Task successfully scheduled.", execution time: "0:00:40"

- INFO, iDRAC connection lost due to slow network connection or component being updated requires iDRAC reset. Script will recheck iDRAC connection in 3 minutes
- INFO, JobStatus not completed, current status: "Job in progress.", execution time: "0:04:30"

- PASS, job ID JID_389904483460 successfully marked completed

- Final detailed job results -

@odata.context: /redfish/v1/$metadata#DellJob.DellJob
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs/JID_389904483460
@odata.type: #DellJob.v1_1_0.DellJob
ActualRunningStartTime: 2021-12-08T13:16:06
ActualRunningStopTime: 2021-12-08T13:18:25
CompletionTime: 2021-12-08T13:18:25
Description: Job Instance
EndTime: TIME_NA
Id: JID_389904483460
JobState: Completed
JobType: NICConfiguration
Message: Job completed successfully.
MessageArgs: []
[email protected]: 0
MessageId: PR19
Name: Configure: NIC.Embedded.1-1-1
PercentComplete: 100
StartTime: 2021-12-08T13:07:28
TargetSettingsURI: None

- JOB ID JID_389904483460 completed in 0:05:03

C:\Python39>GetSetOemNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin -a NIC.Embedded.1-1-1 -A LegacyBootProto

Attribute Name: LegacyBootProto, Attribute value: PXE

@j20d
Copy link

j20d commented Aug 11, 2022

Those scripts all seem to run that patch-operation for one NIC, and that's what we were able to duplicate by patching via curl.
Is there a way to do that for multiple NICs with one job instead of rebooting once per NIC?

@texroemer
Copy link

texroemer commented Aug 11, 2022

Hi @j20d

Configuration jobs are per network FQDD or port so if you want to make attribute changes on multiple NICs, you need to create a config job per each NIC. Once you have created all config jobs, you can now reboot the server and all jobs will execute at once, only one reboot needed to apply changes to all NICs.

Example below where i create a config job per embedded NIC. Once i confirm both jobs are in scheduled state, i can reboot the server to run both jobs.

C:\Python39>GetSetOemNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin --set NIC.Embedded.1-1-1 --attribute-names WakeOnLan,LegacyBootProto --attribute-values Disabled,NONE

- INFO, script will be setting network attribute(s) -

Attribute Name: WakeOnLan, setting new value to: Disabled
Attribute Name: LegacyBootProto, setting new value to: NONE

- PASS: PATCH command passed to set network attribute pending values and create next reboot config job, status code 202 returned
- PASS, NIC config job ID JID_602487137001 successfully created
- INFO: job status not scheduled, current status: New
- INFO, staged config job marked as scheduled
- INFO, argument --reboot not detected, server will not auto reboot. Config job is still scheduled and will execute on next server manual reboot.

C:\Python39>GetSetOemNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin --set NIC.Embedded.2-1-1 --attribute-names WakeOnLan,LegacyBootProto --attribute-values Disabled,NONE

- INFO, script will be setting network attribute(s) -

Attribute Name: WakeOnLan, setting new value to: Disabled
Attribute Name: LegacyBootProto, setting new value to: NONE

- PASS: PATCH command passed to set network attribute pending values and create next reboot config job, status code 202 returned
- PASS, NIC config job ID JID_602487489312 successfully created
- INFO: job status not scheduled, current status: New
- INFO, staged config job marked as scheduled
- INFO, argument --reboot not detected, server will not auto reboot. Config job is still scheduled and will execute on next server manual reboot.

C:\Python39>DeleteJobQueueREDFISH.py -ip 192.168.0.120 -u root -p calvin --get

- INFO, current job IDs in the job queue for iDRAC 192.168.0.120:

{'@odata.context': '/redfish/v1/$metadata#DellJob.DellJob',
 '@odata.id': '/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs/JID_602487137001',
 '@odata.type': '#DellJob.v1_2_0.DellJob',
 'ActualRunningStartTime': None,
 'ActualRunningStopTime': None,
 'CompletionTime': None,
 'Description': 'Job Instance',
 'EndTime': 'TIME_NA',
 'Id': 'JID_602487137001',
 'JobState': 'Scheduled',
 'JobType': 'NICConfiguration',
 'Message': 'Task successfully scheduled.',
 'MessageArgs': [],
 '[email protected]': 0,
 'MessageId': 'JCP001',
 'Name': 'Configure: NIC.Embedded.1-1-1',
 'PercentComplete': 0,
 'StartTime': '2022-08-11T15:11:53',
 'TargetSettingsURI': None}


{'@odata.context': '/redfish/v1/$metadata#DellJob.DellJob',
 '@odata.id': '/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs/JID_602487489312',
 '@odata.type': '#DellJob.v1_2_0.DellJob',
 'ActualRunningStartTime': None,
 'ActualRunningStopTime': None,
 'CompletionTime': None,
 'Description': 'Job Instance',
 'EndTime': 'TIME_NA',
 'Id': 'JID_602487489312',
 'JobState': 'Scheduled',
 'JobType': 'NICConfiguration',
 'Message': 'Task successfully scheduled.',
 'MessageArgs': [],
 '[email protected]': 0,
 'MessageId': 'JCP001',
 'Name': 'Configure: NIC.Embedded.2-1-1',
 'PercentComplete': 0,
 'StartTime': '2022-08-11T15:12:28',
 'TargetSettingsURI': None}


C:\Python39>GetSetPowerStateREDFISH.py -ip 192.168.0.120 -u root -p calvin --set GracefulRestart

- INFO, setting new server power state to: GracefulRestart

- PASS, status code 204 returned, server power state successfully set to "GracefulRestart"

@GamerGun
Copy link

I'm trying to achieve setting LegacyBootProto the legacy way, but i can't seem to get it to work. I've been trying to do so with Ansible, using the Py script as guideline.

I first tried writing to redfish/v1/Registries/NetworkAttributesRegistry/NetworkAttributesRegistry.json directly, but that is not allowed apparently.

It seems that i have to write to something like;
/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters/%s/NetworkDeviceFunctions/%s/Oem/Dell/DellNetworkAttributes/%s/Settings

However,
I can get the path working up to Oem, then it breaks;
/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters/NIC.Integrated.1/NetworkDeviceFunctions/NIC.Integrated.1-1-1

Perhaps because of the Integrated NIC vs Embedded? It's a Broadcom nic but not sure what the path should be then...

Thanks in advance

@texroemer
Copy link

Hi @GamerGun

Can you please post this issue on the Ansible GitHub page instead. Ansible team at Dell will be able to respond and help you out.

https://github.com/ansible/ansible/issues

For workflow details on how to configure network attributes, see Redfish FAQ whitepaper section 5.

https://dl.dell.com/content/manual16004247-idrac-redfish-faq.pdf?language=en-us

Thanks
Tex

@GamerGun
Copy link

GamerGun commented Apr 24, 2023

Hi @texroemer

Well your whitepaper actually solved it for me, so thank you very much.

In case someone is interested;

- hosts: all
  gather_facts: false
  become: false
  vars:
    idrac_username: "root"
    idrac_password: "{{ vault_idrac_root_password_linux }}"
    idrac_ip: "{{ hostvars[inventory_hostname]['idrac'] }}"
    network_device_id: "NIC.Integrated.1"
    network_device_function_id: "NIC.Integrated.1-2-1"

  tasks:
    - name: Set LegacyBootProto to PXE
      local_action:
        module: uri
        url: "https://{{ idrac_ip }}/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters/{{ network_device_id }}/NetworkDeviceFunctions/{{ network_device_function_id }}/Oem/Dell/DellNetworkAttributes/{{ network_device_function_id }}/Settings"
        method: PATCH
        body_format: json
        validate_certs: false
        headers:
          Content-Type: "application/json"
          Authorization: "Basic {{ (idrac_username + ':' + idrac_password) | b64encode }}"
        body:
          "@Redfish.SettingsApplyTime":
            ApplyTime: "Immediate"
            #ApplyTime: "OnReset"
          Attributes:
            LegacyBootProto: "PXE"
        status_code:
          - 200
          - 202
      register: task_result
      when: hostvars[inventory_hostname]['idrac'] is defined
      failed_when: false

    - name: Save output to file
      ansible.builtin.copy:
        content: |
          {{ inventory_file|basename }} - {{ inventory_hostname }} - {{ hostvars[inventory_hostname]['idrac'] }}
          ----------------------------------------
          {% if task_result.msg is defined %}
          Message: {{ task_result.msg }}
          {% endif %}
          {% if task_result.json is defined and task_result.json.error and task_result.json.error['@Message.ExtendedInfo'] is defined %}
          Message: {{ task_result.json.error['@Message.ExtendedInfo'][0].Message }}
          {% endif %}
        dest: "output/{{ inventory_file|basename }}-{{ inventory_hostname }}-output-pxe.txt"
        mode: "0644"
      delegate_to: localhost

@texroemer
Copy link

@GamerGun

Great to hear the whitepaper helped solve the issue. FYI, we also have a couple more Redfish whitepapers posted that can help you with other iDRAC feature workflows.

https://dl.dell.com/content/manual24821844-idrac9-user-interface-to-redfish-mapping.pdf?language=en-us

https://dl.dell.com/content/manual9969682-idrac9-racadm-to-redfish-mapping.pdf?language=en-us

Thanks
Tex

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

10 participants