Skip to main content

compare command

Use the compare command to compare the list of installed firmware and device drivers, generated by the scan command, to the available update list, generated by the query command, and recommend a set of updates to apply. The XML file generated by the compare command can be used by the flash command.

Users can specify XML files generated by previously run scan and query commands using the --scanxml and --queryxml parameters. The compare command also checks the prerequisite requirements for all update packages and list updates in their required order for the flash command.

compare command syntax

Onecli.exe update compare [--scanxml <filename>] [--noscan] [--backup] [--bmc <userid:password@host[:port]>] 
[--remoteos userid:passord@host[:port]>] [--cmm <userid:password@host[:port]>]
[--smm <userid:password@host[:port]>] [--esxi <userid:password@host[:port]>] [--iobay <bay_number>]
[--mt <machine type>] [ostype <operating_system> --osarch <architecture>] [--queryxml <filename>]
[--scope <scope>] [--type <type>] [--includeid <includeids>] [--forceid <forceids>] [--excludeid <excludeids>]
[--dir <folder>] [--output <folder>] [<options>]

Options

--remoteos
Specify the remote OS for OneCLI to manage system. After connecting to Linux OS, OneCLI supports to update firmware and device driver. Ensure that the OneCLI binary for the remote Linux OS is in the directory specified with --dir. The sample command is: ./OneCli update compare --remoteos root@xx. xx.xx.xx --dir packages --quiet.
Note
Before using this function, users should set PasswordAuthentication yes to enable the tunneled clear text passwords in /etc/ssh/ sshd_config.
Table 1. compare command specific parameters
ParameterRequired/OptionalNotes
--backupOptional

By default, if the --backup parameter is specified, OneCLI flashes the IMM and UEFI backup firmware by running the flash command.

The --backup parameter is only used with the --nocompare parameter (in no compare mode).

--checkdeviceOptionalScan dd of the physical exist device.
--cmmOptionalSpecify the CMM information for scan functions. If the --scanxml parameter or the --noscan parameter is specified, this parameter is not required.
--dirOptional

folder specifies the path name location of the packages directory.

If no directory is specified, the current directory is used for the compare command queries.

--excludeid, -EOptional

Never flash the excluded packages unless they are prerequisite. Users can set multiple IDs by separating them with comma(,).

By default: none is excluded.

--forceid, -FOptional

The ids can be a comma-separated list that specifies the package IDs which are usually the package file name without file extension for queries and comparison. Users can also specify an argument of all to force query and comparison of all listed packages.

For example: lnvgy_dd_sraidmr_7.700.20.00_sles12_x86-64

By default: none is included.

Use the --forceid parameter to force firmware or device driver queries and comparison that support package downgrades and in-box to out-of-box device driver updates. It works in the following cases:
  • Query and compare for downgrade packages.

  • Ignores the “never” tag in the package XML file. For example, when querying and comparing HBA updates for QLogic devices.

  • Forces out-of-box device driver updates to override in-box device drivers.

  • Ignores missing prerequisites, listing packages to install in all cases.

--iobayOptional

bay_number specifies the I/O module bay number. Valid values are 1, 2, 3, or 4.

The --iobay parameter specifies an I/O module compare operation. When comparing an I/O module target, the --cmm parameter must also be specified.

--includeid, -IOptional

Specify the target package ID for different commands. Usually an ID is the package file name without extension.

For example: lnvgy_dd_sraidmr_7.700.20.00_sles12_x86-64

It is allowed to input multiple packages IDs using a comma-separated list.

By default: none is included.

For the BMC target, if the --includeid parameter is not specified, only the packages specified by the --scope parameter are queried and compared.

For the BMC target, if the --includeid parameter is specified, only the listed packages are queried and compared in addition to those specified by the --scope parameter: if no packages are listed, no additional packages are queried and compared.

For the CMM, SMM and I/O module targets the --scope parameter is not used, so only those packages specified by the --includeid parameter are queried and compared.

--mtOptional

Specify the machine type of target device. Lenovo server, chassis, and enclosure all have machine types.

The --mt parameter is required only when using the --noscan parameter (the system is not automatically obtaining the machine-type information).

For the I/O module target, the CMM machine type is specified.

--noscanOptional

If the --noscan parameter is specified, the compare command obtains query results directly for comparison without using the scan results.

If the --noscan parameter is specified, the following command parameters are not required:

  • --scanxml

  • --bmc

  • --cmm

  • --smm

If the --queryxml parameter is not specified when using the --noscan parameter, users must specify the --mt, --ostype, and --osarch parameters.

--ostype, -tOptional

Specify operating system deployed on the target system. Valid choices are win2008, win2012, win2012r2, win2016, rhel5, rhel6, rhel7, sles10, sles11, sles12, esxi5.0, esxi5.1, esxi5.5, esxi6.0, esxi6.5, platform, and none.

"none" is the default setting and is used for operating system independent updates, such as UEFI or BMC updates.

"platform" type represents a bundle of updates which are specially used for remote update. They include firmware only and are also OS independent.

The --ostype parameter is not required for CMM, SMM, or I/O module targets.

The --ostype parameter is required only when using the --noscan parameter (the system is not automatically obtaining the operating system information).

--osarch, -aOptional

architecture specifies operating system architecture where users are running the OneCLI. Valid choices are x86, x64, and none.

None is the default setting and is used for operating system independent operations, such as BMC & CMM firmware updates.

The --osarch parameter is needed only when the user is unable to determine their operating system information. It is used with the --noscan parameter.

The --osarch parameter is not used for CMM, SMM, or I/O module targets.

--queryxmlOptional

filename specifies a query result file to control the compare command. If a query result file is specified, the following command parameters cannot be used:

  • --mt

  • --includeid

  • --forceid

  • --dir

  • --ostype

  • --osarch

  • --scope

  • --type

--remoteosOptional

Specify the remote OS login credential for OneCLI to manage system in the local host OS.

Support Windows-to-Windows, Linux-to-Linux, and Windows-to-Linux.

--scanxmlOptional

filename specifies a scan result file to control the compare command. If a scan result file is specified, the following command parameters cannot be used:

  • --noscan

  • --bmc

  • --cmm

  • --smm

  • --iobay

  • --mt

  • --ostype

  • --osarch

  • --config

--scope, -sOptional
Specify the scope of update operations. Different scopes mean different operation strategies. Valid choices are:
  • uxsp: operation strategy is to focus on UXSP and make bundle update.
  • latest: operation strategy is to help users to find and use latest updates. Even a particular package name is given by using "--includeid", OneCLI will still search whether there are later versions of the package and use the newest one if there are.

  • individual: operation strategy is to find and use the packages specified by the --includeid parameter.
--smmRequired

Specify the access information of the target SMM. The format is: userid:password@host[:port].

Note
  • Both the IPv4 address and the IPv6 address are supported. The IPv6 address shall be enclosed in square brackets. For example, [FE80:3BA7:94FF:FE07:CBD0].

  • If the IPv6 is LLA, the format is [FE80:3BA7:94FF:FE07:CBD0%xxx]. Replace xxx with the interface name.

--type, -TOptional

type specifies the type of package to compare. Valid choices are:

  • fw|dd (default) to compare firmware and device drivers

  • fw to compare firmware

  • dd to compare device drivers

Packages are not compared for the CMM and I/O module targets.

  • --bmc/imm, -b

  • --bmc-cim-port, -p

  • --bmc-password, -w

  • --bmc-rest

    -port
  • --bmc-username, -u

  • --configfile

  • --check-trust, -C

  • --config

  • --nolog

  • --never-check-trust, -N

  • --output, -o

Optional

Refer to Table 2.

Example of the compare command

In this example, we are creating an update list (update compare command) of the latest updates (--scope latest argument) for a BMC that is accessed with a user ID of “userid”, a password of “password”, and an IP address of “host” (--bmc userid:password@host argument), storing it in the “.\packages\” directory (--dir .\packages\ argument) and storing the log file in the “.\787502cn03e\output\” directory (--output .\787502cn03e\output\ argument). In this example, the compare command performs its own scan and query functions, since no XML files are specified for the --scanxml and --queryxml parameters.

Onecli.exe update compare --scope latest --bmc userid:password@BMCIP --dir .\packages\
--output .\787502cn03e\output\