Lifecycle Controller Remote Firmware Update Scripting
Lifecycle Controller Remote Firmware Update Scripting
Lifecycle Controller Remote Firmware Update Scripting
Author(s)
Chris A. Poblete
Raja Tamilarasan
This document is for informational purposes only and may contain typographical errors and
technical inaccuracies. The content is provided as is, without express or implied warranties of
any kind.
© 2012 Dell Inc. All rights reserved. Dell and its affiliates cannot be responsible for errors or
omissions in typography or photography. Dell, the Dell logo, and PowerEdge are trademarks of Dell
Inc. Microsoft, Windows, and Windows Server are either trademarks or registered trademarks of
Microsoft Corporation in the United States and/or other countries. Other trademarks and trade
names may be used in this document to refer to either the entities claiming the marks and names or
their products. Dell disclaims proprietary interest in the marks and names of others.
WS-MAN is a network transport service that enables a user to access a number of Common
Information Model (CIM) data access and methods supported by the target platform. WS-MAN can be
scripted using command line interfaces (CLI) such as WinRM on Microsoft® Windows® systems and
WS-MAN CLI on Linux systems.
This document uses the Python scripting platform, which run son both Windows and Linux systems.
Some additional reading of specification documents may be required to understand the terminology
and concepts in this paper.
1. Make sure the target system is a PowerEdge server with iDRAC enabled, configured, and
network accessible to communicate with WS-MAN.
2. For Windows, make sure the WinRM command line tool is configured and ready (for help, see
Installation and Configuration of Windows Remote Management).
For Linux, make sure the Openwsman CLI is built, installed, and ready (for help, go to the
Openwsman Home and join the mailing list).
3. Make sure Python 2.7 is installed on the target system (for help, see Python Home).
a. [fw_inventory.py]
b. [fwupdate.py]
c. [fw_poll.py]
3 Update Repository
2 Target System
Figure 2 shows an example of the target environment. It starts with the administrator (1) running
scripts to send WS-MAN commands through an SSL connection. The target system (2) is equipped with
iDRAC, which is a management controller with advanced capabilities. The update repository (3)
contains the Dell Update Packages (DUPs) that will be used to update the firmware on the target
system.
./fw_inventory.py --help
Usage: fw_inventory.py [options]
Options:
-h, --help show this help message and exit
-v, --verbose Prints information verbosely
-f FWUPDATE, --firmware component=FWUPDATE
prints component information(nic, bios, idrac_fw,
drivers_pack, power_supply, raid,
lifecycle_controller, diagnostics)
The first argument is the IP address of the iDRAC on the target system. The second argument is the
user name; if the user is an Active Directory account, then the syntax is USER@DOMAIN. The third
argument is the user password.
3. The script establishes a connection with the iDRAC and also performs certificate validation.
Sample output:
13(update) APAC Installed 18981 7.0.0.38 Dell OS Driver Pack, v.7.0.0.38, X38
./fwupdate.py -h
Usage: fwupdate.py [options]
Options:
-h, --help show this help message and exit
-f CONFIG_FILE, --file=CONFIG_FILE
Enter config file with parameters the script needs.
Example of a file is fwupdate.cfg.
-v, --verbose Prints information verbosely
--cleanenv Cleans .log, .xml, and .cer files in current directory.
The first argument is the IP address of the iDRAC on the target system. The second argument is the
user name; if the user is an Active Directory account, then the syntax is USER@DOMAIN. The third
argument is the user password.
3. The script establishes a connection with the iDRAC and also performs certificate validation.
4. Once a successful connection is established, the fwupdate.py script performs a Software Inventory
and lists the components that are available to be updated.
Each entry in the output lists a device that can either be updated to firmware located on a network
share (ftp/http/tftp/nfs/cifs) or rolled back to a previous firmware version stored on the iDRAC.
5. Select the component alias (from step 3) for the component you would like to inventory. Once a
component type is selected, the script lists options that are available for rollback and update for
that particular component.
The script will prompt for the location of the Dell Update Package (DUP) to be used. iDRAC
supports the following download methods with source URI syntax:
• FTP
ftp://[IPADDRESS]/[LOCATION]/[DUPFILENAME]
• HTTP
http://[IPADDRESS]/[LOCATION]/[DUPFILENAME]
• TFTP
tftp://[IPADDRESS]/[LOCATION]/[DUPFILENAME]
• CIFS
cifs://[USER]:[PASSWORD]@[IPADDRESS]/[LOCATION]/[DUPFILENAME];mountpoint=[MOUNTN
AME]
• NFS
nfs://[IPADDRESS]/[LOCATION]/[DUPFILENAME];mountpoint=[MOUNTNAME]
The all-caps portions of the syntax represent user-provided values. The [IPADDRESS] is the IP address
of the update package repository. The [LOCATION] is the path or directory. The [DUPFILENAME] is the
update package file name; the only supported update package is the “Dell Update Package for
Windows” that can be downloaded from support.dell.com. [USER] and [PASSWORD] refer to the user
credentials required to access and download files from the share. [MOUNTNAME] refers to the share
mount name.
Sample output:
Options
tftp://192.168.0.100/BIOS-2011.exe
nfs://192.168.0.100/BIOS-2011.exe;mountpoint=/pub
cifs://DOMAIN\\USER:PASS@192.168.0.100/pub/BIOS-2011.exe;mountpoint=E
http://192.168.0.100/BIOS-2011.exe
ftp://192.168.0.100/BIOS-2011.exe
6. The script will prompt for a reboot type that the host will use reboot before performing the
update. Select an appropriate reboot type.
4 = No reboot
7. The script asks for permission to delete all existing jobs in iDRAC. It is recommended to choose yes
for a clean start.
Erase all previous jobs stored in the iDRAC? (yes/no) yes
8. The script requests a start time for the job. The job can be scheduled immediately or for a future
time.
Schedule the nic update now or schedule later (now, schedule)? now
The format of the StartTime argument is defined by the CIM Infrastructure Specification.
Enter now to schedule the jobs immediately, or enter schedule to schedule the job for a
future time. The schedule option will prompt for a start time, which you must enter in the
format MM-DD-YYYY hh:mm:ss
12-13-2011 11:11:11
The update package is downloaded from the repository. This may take some time depending on the
size of the package and network state. After the update package is successfully downloaded, the
update and the reboot job are scheduled for the specified start time.
If the command fails, check that the InstanceID you provided is accurate by comparing it with output
from the previous step. Remember that characters are case sensitive. Also, check the accuracy of the
source URI to ensure it is accessible with proper permission. Once verified, try the command again.
After the specified start time elapses, the host reboots and launces System Services to perform the
firmware update.
./fw_poll.py -h
Usage: fw_poll.py [options]
Options:
-h, --help show this help message and exit
-j JOBID, --JobID=JOBID
Provide one of the JobIDs (begins with JID or RID)
within the fwupdate.out file
-v, --verbose Prints information verbosely
1. The first argument is the IP address of the iDRAC on the target system. The second argument is
the user name; if the user is an Active Directory account, then the syntax is USER@DOMAIN. The
third argument is the user password.
Sample output:
Available JobIDs.
(1) JID_267336093962
(2) RID_267336106745
JobStatus = Scheduled
MessageArguments = NA
MessageID = JCP001
Name = update:DCIM:INSTALLED#701__NIC.Integrated.1-2-1
3. Select the number corresponding to your job to display the current status.
The script performs two step executions. The first step is to monitor the status of the job associated
with the update. When it detects the status is completed, it monitors the status of the data sync. At
this time, the update has been executed and the device is running the new firmware level.
To determine if firmware can be rolled back, examine the inventory list and look for “available” in the
status. For example:
To perform a rollback, select the firmware entry marked “available” and run the update script without
the source URI. The script will detect that the request is a roll back and will execute the proper
commands. Unlike an update, a rollback does not go through the download phase. Jump to scheduling
the update and follow the rest of the process.
Sample output:
./fwupdate.py
Enter iDRAC IP Address: 10.36.0.117
Enter User Name: root
Enter User Password:
Pinging 10.36.0.117. Waiting for response. Done.
Certificate exists!
Choices:
d Select different component
OPTION 1,2,3
ENTER: 1
Reboot Type Options (1,2,3, and 4)
1 = Forceful shutdown and reboot
2 = Graceful shutdown and reboot (Recommended)
3 = Forceful shutdown if graceful shutdown does not succeed
4 = No reboot
Enter reboot type: 1
Erase all previous jobs stored in the iDRAC? (yes/no) yes
Deleting all iDRAC jobs
Completed job deletion
Schedule the nic rollback now or schedule later (now, schedule)? now
Creating nic rollback job
nic rollback successfully created
Creating reboot job
Reboot job successfully created.
Scheduling nic rollback job
Scheduling reboot job
The nic rollback from 7.0.47 to the image 7.0.47
Check the status of the reboot job and the nic rollback job by using the fw_pull.py script.
Summary
In this paper, you have learned how to perform an inventory of firmware installed on your system, a
firmware update on select system devices, and a firmware rollback.
Additional Resources
Lear more about firmware inventory as defined by the Dell CIM profile specification:
http://www.delltechcenter.com/page/DCIM.Library.Profiles.DCIM+Software+Inventory+Profile+1.0
Lear more about firmware update as defined by the Dell CIM profile specification:
http://www.delltechcenter.com/page/DCIM.Library.Profile.DCIM+Software+Update+Profile+1.0
Lear more about job control as defined by the Dell CIM profile specification:
http://www.delltechcenter.com/page/DCIM+Job+Control+Profile+1.1