VMware_ESXi/ESXi7.0/readme.txt

 
                    ============================
                    R E A D M E N O T E S
                    ============================
        Marvell- QLogic FastLinQ PowerKit for Windows, Linux and ESXi
            Marvell Semiconductor Inc, Copyright (c) 2021,
                        All rights reserved.
 
 
 
 
 
 
                         
==================
Table of Contents
==================
 
    [1]. Introduction
    [2]. Prerequisites
    [3]. Scope
    [4]. Limitation
    [5]. Installation
    [6]. UnInstallation
    [7]. Executing Cmdlets
     
        7.(a) Executing Cmdlets on Local and Remote Host through RPC and CIM Session:
        -----------------------------------------------------------------------------
            [1]. Executing Cmdlets on [Local Host System]:
            ----------------------------------------------
                a] [Local Windows Host System]
             
            [2]. Executing Cmdlets on [Remote Host System]:
            ----------------------------------------------
                i) Connecting Remote Host System through RPC (Connect-QLGCHost):
                ----------------------------------------------------------------
             
                    a] [Local Windows Host System] --> [Remote Windows Host System]
                    b] [Local Windows Host System] --> [Remote Linux Host System]
                     
                ii) Connecting Remote Host System through CIM Session:
                -----------------------------------------------------
             
                    a] [Local Windows Host System] --> [Remote Windows Host System]
                    b] [Local Windows Host System] --> [Remote Linux Host System]
                    c] [Local Windows Host System] --> [Remote ESXi Host System]
             
        7.(b) Firmware Upgrade Operation:
        ---------------------------------
         
    [8]. Steps to use PowerShell Cmdlets with ansible
    [9]. Available Cmdlets and Description
    [10]. Known Issues
 
 
 
     
================
1. Introduction:
================
 
QLogic/Marvell FastLinQ PowerKit is a PowerShell kit for managing QLogic/Marvell 34xx/84xx/45xxx family of adapters using PowerShell Cmdlets.
 
The QLogic FastLinQ PowerKit consists of the following two components.
 
    a] WMIv2, OMI provider and qlgcfastlinq ESXi Provider for Windows, Linux and ESXi respectively.
    b] PowerShell Cmdlets for managing QLogic FastLinQ 34xx/84xx/45xxx adapter family.
     
 
     
================
2. Prerequisites:
================
     
    a] WMIv2/OMI/qlgcfastlinq ESXi provider or QLNX-Agent for Windows/Linux/ESXi is installed
        properly on the host system with QLogic FastLinQ 34xx/84xx/45xxx adapter family that is to be managed by the FastLinQ Cmdlets.
         
    b] QLogic FastLinQ PowerKit be installed properly on the Windows system from which you plan to manage the local/remote
        Windows, Linux and ESXi host system with QLogic FastLinQ 34xx/84xx/45xxx adapter family.
         
    c] Appropriate device driver for the QLogic NIC is to be installed on the host system that is to be managed by the QLogic FastLinQ PowerKit.
         
    d] OmiServer must be installed prior to installing the OMI provider on host Linux systems.
         
    e] For managing iSCSI on Linux hosts, open-iscsi and sg utilities are required to be installed on the Linux host.
         
    f] Microsoft iSCSI initiator be installed on the Windows host server.
         
    g] On the Windows machine where the PowerKit is getting installed, the QLNX-Agent version MUST be versioned 4.111.1000.79 or higher.
 
 
     
=========
3. Scope:
=========
 
        a] Windows:
        -----------
        -> Supported Operating Systems for the WMIv2 provider or the QLogic FastLinQ PowerKit as follows.
 
            # Windows Server 2012
            # Windows Server 2012 R2
            # Windows Server 2016
            # Windows Server 2019 [Standard/Data center]
             
            # Windows Server Core 2016
            # Windows Server Core 2019
     
                 
        b] Linux:
        ---------
        -> Supported Operating Systems for the OMI provider and OMI server/CIMOM as follows.
 
            # All Linux distributions that OMI server/CIMOM is supported.
            # Please refer to the following link for further details on OMI server/CIMOM:
            https://github.com/Microsoft/omi
            (or)
            https://collaboration.opengroup.org/omi/
         
         
        c] VMware-ESXi:
        ---------------
        -> Supported Operating Systems for qlgcfastlinq VMware ESXi provider and SFCB server/CIMOM as follows.
         
            # VMware ESXi_5.5
            # VMware ESXi_6.0
            # VMware ESXi_6.5
            # VMware ESXi_6.7
            # VMware ESXi_7.0
 
 
             
==============
4. Limitation:
==============
 
    1]. Firewall exceptions need to be made for remote host system management using Cmdlets.
 
 
     
================
5. Installation:
================
 
    1. Windows:
    -----------
 
    Off-line installation through Installer files:
    ---------------------------------------------
    You can install the QCC PowerKit on a Windows OS either offline using the
    installer files, or online using the PowerShell Gallery. Both methods are described
    in the following sections.
             
        If you have a previous version of the QCC PowerKit, uninstall it before installing
        the latest version.
         
            -> To see if you have a previous version installed, issue the PowerShell
            Get-QLGCAdapter command.
             
            -> To view the currently installed version of QCC PowerKit (on the local
            Windows system), issue the PowerShell Get-AppxPackage -Name
            “QLGCProvider” command (see the output's Version line) or the
            Get-QLGCManagedLocalHost command (see the output's ProviderVersion
            line).
             
            -> If you are connecting to a remote server (where QCC PowerKit is installed),
            issue the Get-QLGCManagedLocalHost -CimSession $Session command
            (see the output's ProviderVersion line) to see the version of QCC PowerKit
            installed on that remote server.
     
     
    To install the QCC PowerKit in a Windows OS:
     
    a]. Copy the QCC PowerKit files to the Windows host.
    b]. Open a PowerShell prompt as an administrator.
    c]. Navigate to the directory where you copied the PowerKit files.
    d]. Issue one of the following commands in a New Power-shell prompt session:
 
    Method 1: install the cmdlets, WMIv2 Provider and WinRM/Posh_SSH/REST server with user prompts:
    ------------------------------------------------------------------------------------------------
    -> Issue the following command:
     
    # .\InstallFastLinqPowerKit.ps1
     
    -> You are prompted to install the following configuration/modules.
    Select Y (yes) or N (no). The default is Y (Yes).
        - WinRM configuration
        - Posh_SSH module
        - REST server
             
    Method 2: install only the cmdlets and the WMIv2 Provider in silentmode (without user prompts):
    -----------------------------------------------------------------------------------------------
    -> Issue the following command:
         
    # .\InstallFastLinqPowerKit.ps1 -ConfigureWinRM:$false -InstallPoshSSHModule:$false -InstallRESTServer:$false
     
    For Method-1, you are prompted to install the REST server. This server
    allows you to issue PowerShell cmdlets through REST requests.
        To install the REST server:
        -> At the prompt, enter either http or https.
        -> At the prompt, enter the HTTP or HTTPs port you want to user for the REST server (the default is 7777).
 
    -> Start typing Get-QLGC, and then press the TAB key.
    The Get-QLGCAdapter cmdlet should auto-populate.
    -> Issue the following command to confirm that the cmdlets are working properly: Get-QLGCAdapter
     
    -> (if required) Load the new WMI Provider by one of the following methods:
      From the Services Window Panel, restart WMI.
     From the Task Manager Window, end all the old processes named WMI Provider Host.
 
             
        On-line installation through PowerShell Gallery:
        -----------------------------------------------
         
        -> The user can install the QLogicFastLinQPowerKit through online from the following PowerShell Gallery website.
         
            https://www.powershellgallery.com/packages/QLogicFastLinQPowerKit
         
        -> Please make sure that "Install-Module" Cmdlet is available in PowerShell otherwise update PowerShell by using following link.
         
            https://gallery.technet.microsoft.com/office/PowerShell-Install-Module-388e47a1
     
     
        Steps for Installation:
        -----------------------
         
            Step-1: Open the PowerShell prompt as "Administrator" and
                    execute following command to download the latest available version of PowerKit from PowerShell Gallery website.
             
                    # Install-Module -Name QLogicFastLinQPowerKit
                     
                (or) User can also install desired version by using following command.
                 
                    # Install-Module -Name QLogicFastLinQPowerKit -RequiredVersion "1.0.67.0"
                 
            Step-2: Execute following command to check if Modules/Functions of QLogicFastLinQPowerKit are imported or not.
             
                    # Get-Command -Module QLogicFastLinQPowerKit
             
            Step-3: Execute following command to install QLogicFastLinQPowerKit.
             
                Method 1: install the cmdlets, WMIv2 Provider and WinRM/Posh_SSH/REST server with user prompts:
                -----------------------------------------------------------------------------------------------
                 
                        # Install-QLogicFastLinqPowerKit
                         
                Method 2: install only the cmdlets and the WMIv2 Provider in silentmode (without user prompts):
                ------------------------------------------------------------------------------------------------
                 
                        # Install-QLogicFastLinqPowerKit -ConfigureWinRM:$true -InstallPoshSSHModule:$true -InstallRESTServer:$true
 
                 
    Notes:
    ------
        i]. Please make sure that uninstall the old Powerkit (provider and Cmdlets) if the user installed earlier,
              before installation of new PowerKit (provider and Cmdlets).
        ii]. Please restart the WMI (Windows Management Instrumentation) from "Services Window Panel" after installation of PowerKit if required.
        iii]. Please close or end all the old tasks named as "WMI Provider Host" in processes from "Task Manager Window" after installation of PowerKit if required.
 
 
         
    2. Linux:
    ---------
         
    a] Download and install the appropriate latest OMI server package for your Linux machine from the following websites.
     
        https://github.com/Microsoft/omi
        (or)
        https://collaboration.opengroup.org/omi/
         
        RPM packages are provided for the installation of OMI on most enterprise Linux distributions.
        Choose the package based upon architecture, OpenSSL version and Package format as follows.
         
            -> 32-bit (x86) or 64-bit (x64) architecture.
            -> OpenSSL version 0.9.8, 1.0.x or 1.1.x (to determine your OpenSSL version, run: openssl version).
            -> RPM or Debian package format.
             
        Example:
            # rpm -ivh omi-1.4.2-5.ssl_100.ulinux.x64.rpm
         
    b] Make sure omiserver is running on the Linux host system and use the below commands to set httpport and httpsport ports to listen on.
         
        # /opt/omi/bin/omiserver --> To see the status of OMI Server.
        # /opt/omi/bin/omiserver --httpport 5985 --httpsport 5986 -s --> To stop OMI Server on Linux host system.
        # /opt/omi/bin/omiserver --httpport 5985 --httpsport 5986 -d --> To start OMI Server and set the http port.
         
    c] Copy the appropriate QLogic OMI provider rpm package:
        QLGC_OMIProvider-X.X.XX-0.i386.rpm (For x86 Linux)
        QLGC_OMIProvider-X.X.XX-0.x86_64.rpm (For x64 Linux)
                 
    d] Install the appropriate QLogic OMI provider rpm package.
         
    Example:
        # rpm -ivh QLGC_OMIProvider-X.X.XX-0.x86_64.rpm
         
    e] Restart the omiserver if necessary.
         
    f] Add firewall exceptions to open up the omiserver ports
        for remote cmdlets to talk to the OMI server/provider.
             
        Note:
        1] Please make sure that unInstall the old provider if you installed earlier, before installation of new provider.
 
 
         
    3. ESXi:
    --------
        Follow the below commands to install QLogic qlgcfastlinq VMware ESXi provider VIB on ESXi Host System.
             
        # esxcli software vib install -f -d vmware-esx-provider-qlgcfastlinq.zip
 
        Note:
            1] Please make sure that unInstall the old OMI-Provider if you installed earlier, before installation of new OMI-Provider.
            2] The user must reboot the server after successful installation/unInstallation of provider.
 
 
 
             
==================
6. UnInstallation:
==================
 
    1. Windows:
    -----------
     
        Off-line unInstallation through UnInstaller files:
        ------------------------------------------------
        -> Please follow the below commands to unInstall the QLogic FastLinQ PowerKit:
 
            a] Open a powerShell prompt as administrator and navigate to the directory containing the installer files.
 
            b] Run the following command to unInstall the Cmdlets:
 
            # .\UninstallFastLinqPowerKit.ps1
 
            (or)
 
            Run as below on new powerShell prompt session.
            # Import-Module .\UninstallFastLinqPowerKit.ps1 -Force
 
            c] Confirm unInstallation by attempting to run Get-QLGCAdapter
                and having it fail. Cmdlets that you have already used in the
                current PowerShell session may still auto-populate, but will not work if they are ran.
 
             
        On-line unInstallation through PowerShell Gallery:
        --------------------------------------------------
         
        -> Please use the following command to unInstall the QLogicFastLinQPowerKit if user installed it only through online PowerShell Gallery earlier.
         
            # Uninstall-QLogicFastLinqPowerKit
 
         
    2. Linux:
    ---------
         
        -> Please follow the below to unInstall the QLogic OMI provider rpm package which was installed earlier:
             
            # rpm -qa | grep -i QLGC_OMIProvider --> Just to check if the OMI Provider installed or not.
            # rpm -e QLGC_OMIProvider --> To unInstall OMI Provider.
             
         
    3. ESXi:
    --------
         
        -> Please follow the below commands to unInstall QLogic qlgcfastlinq VMware ESXi provider VIB on ESXi Host System.
             
            # esxcli software vib list | grep -i qlgcfastlinq --> Just to check if the qlgcfastlinq ESXi Provider installed or not on Server.
            # esxcli software vib remove -n qlgcfastlinq --> To unInstall qlgcfastlinq ESXi Provider.
         
        Note:
            1] The user must reboot the server after successful installation/unInstallation of provider.
 
 
 
             
=========================================================================
7.Executing Cmdlets
=========================================================================
 
Notes:
======
 
    a] Windows or Linux or ESXi host systems with QLogic FastLinQ 34xx/84xx/45xxx
    adapter family can be managed by QLogic FastLinQ PowerKit Cmdlets.
         
    b] You need to have the QLogic FastLinQ PowerKit installed on a
    Windows system from which you plan to manage locally or remotely the
    Windows/Linux/ESXi host system with QLogic FastLinQ 34xx/84xx/45xxx adapter family.
             
    c] For managing Windows host systems with QLogic FastLinQ 34xx/84xx/45xxx
    adapter family, you need to either have the QLogic FastLinQ
    PowerKit installed with WMIv2 provider or alternatively have QLNX-Agent
    installed.
         
    d] For managing Linux host systems with QLogic FastLinQ 34xx/84xx/45xxx
    adapter family, you need to either have the OMI server/CIMOM installed
    along with the OMI provider or alternatively have QLNX-Agent installed.
         
    e] Use the "Connect-QLGCHost" Cmdlet for connecting to remote Linux/Windows
    host system (that has QLogic FastLinQ 34xx/84xx/45xxxadapter family)
    which has QLNX-Agent installed. Do "Get-Help Connect-QLGCHost"
    to get more help on how to use the "Connect-QLGCHost" Cmdlet.
         
    Note:
        "Connect-QLGCHost" Cmdlet is not supported ESXi host System as RPC is not supported on ESXi.
 
 
 
         
7.(a) Executing Cmdlets on Local and Remote Host through RPC and CIM Session:
-----------------------------------------------------------------------------
 
         
    The user can execute Cmdlets on Local and Remote Host systems through RPC (Connect-QLGCHost) and CIM Session and as following.
 
     
    [1]. Executing Cmdlets on [Local Host System]:
    ----------------------------------------------
     
        a] [Local Windows Host System]
     
     
    [2]. Executing Cmdlets on [Remote Host System]:
    ----------------------------------------------
     
        i) Connecting Remote Host System through RPC (Connect-QLGCHost):
        ----------------------------------------------------------------
     
            a] [Local Windows Host System] --> [Remote Windows Host System]
            b] [Local Windows Host System] --> [Remote Linux Host System]
             
        ii) Connecting Remote Host System through CIM Session:
        -----------------------------------------------------
     
            a] [Local Windows Host System] --> [Remote Windows Host System]
            b] [Local Windows Host System] --> [Remote Linux Host System]
            c] [Local Windows Host System] --> [Remote ESXi Host System]
     
     
     
     
    [1]. Executing Cmdlets on [Local Host System]:
    ----------------------------------------------
     
        a] [Local Windows Host System]:
        -----------------------------
             
        - Use the following procedure to connect to a local Windows host system
        with QLogic FastLinQ 34xx/84xx/45xxx adapter family which has the WMIv2
        provider already installed:
             
            step 1 - Install the latest QLogic FastLinQ PowerKit on Local Windows Host System.
            Step 2 - Run desired Cmdlets on Local Windows Host System.
             
                # Get-QLGCAdapter
                # Get-QLGCFunction
                     
            -> Just invoke the desired QLogic FastLinQ PowerKit cmdlet to
            managed QLogic FastLinQ 34xx/84xx/45xxx adapters on the local Windows host system.
                 
            Note: You can get the usage/Help of Cmdlet as follows.
                             
                    # Get-Help <Cmdlet_Name> [-Examples | -Detailed | -Full ]
                     
            Example:
                    # Get-Help Get-QLGCAdapter
                    # Get-Help Get-QLGCAdapter -Examples
                    # Get-Help Get-QLGCAdapter -Full
                    # Get-Help Get-QLGCAdapter -Detailed
 
 
 
                     
    [2]. Executing Cmdlets on [Remote Host System]:
    ----------------------------------------------
 
     
    i) Connecting Remote Host System through RPC (Connect-QLGCHost):
    ----------------------------------------------------------------
     
        a] [Local Windows Host System] --> [Remote Windows Host System]
        ----------------------------------------------------------------
         
        - Use the following procedure to connect to a remote Windows host system
        with QLogic FastLinQ 34xx/84xx/45xxx adapter family which has the WMIv2
        provider already installed and have QLNX-Agent installed.
         
            Step 1 -> Install the latest QLogic FastLinQ PowerKit on Local Windows Host System.
            Step 2 -> Install the latest QLNX-Agent and QLogic FastLinQ PowerKit on Remote Windows Host System.
            Step 3 -> Run the following Cmdlet to connect Remote Host though RPC on Local Windows Host System..
             
            Syntax:
                    # Connect-QLGCHost -RemoteHost <Remote_Host_IP_Address> -LoginUserName <User_Name> -Password <Remote_Agent_Password>
                 
            Example:
                    # Connect-QLGCHost -RemoteHost 172.28.25.110 -LoginUserName Administrator -Password config
 
                        ResultMessage ReturnValue
                        ------------- -----------
                        Operation is successful. The host is connected successfully. 0
                     
            Step 4 -> Run following Cmdlet to check if the Remote host added or not.
                 
                    # Get-QLGCManagedRemoteHost
                     
                    -> Run the desired Cmdlets on both windows local and remote host systems simultaneously.
                    -> User can disconnect the remote host by using following Cmdlet.
                     
                    # Disconnect-QLGCHost -HostHandle 713990966 -RemoteHost 172.28.25.110
                     
            Notes:
            1] If the operation fails and return 0x70000001, it may be because of the system password entered during ConnectHost instead of agent password.
            2] The parameter "HostHandle" is host Handle of Local Host system and user can get it by executing the Cmdlet "Get-QLGCManagedLocalHost".
            3] This Cmdlet is not supported on ESXi Host system.
 
 
        b] [Local Windows Host System] --> [Remote Linux Host System]:
        --------------------------------------------------------------
         
        -> Use the following procedure to connect to a remote Linux host system
        with QLogic FastLinQ 34xx/84xx/45xxx adapter family which has both OMI
        server/CIMOM, OMI provider and QLNX-Agent installed:
             
            Step 1 -> Install OMI server on Remote Linux Host System if not installed earlier.
            Step 2 -> Install latest OMI Provider and QLNX-Agent on Remote Linux Host System.
            Step 3 -> If you are installing the OMI server 1st time follow the below steps.
     
                # /opt/omi/bin/omiserver -s --> To stop OMI Server on remote Linux host machine.
                # /opt/omi/bin/omiserver --httpport 5985 --httpsport 5986 -d --> To start OMI Server and set the http port.
                # /opt/omi/bin/omiserver --> To see status of OMI Server on remote Linux machine.
                     
            Note:
                -> Add firewall exceptions to open up the omiserver ports for remote Cmdlets to talk to the OMI server/OMI provider.
                     
            Step 4 -> Install the latest QLogic FastLinQ PowerKit on Local Windows Host System.
     
            Step 5 -> Run the following Cmdlet to connect Remote Host though RPC on Local Windows Host System..
             
            Syntax:
                    # Connect-QLGCHost -RemoteHost <Remote_Host_IP_Address> -LoginUserName <User_Name> -Password <Remote_Agent_Password>
                 
            Example:
                    # Connect-QLGCHost -RemoteHost 172.28.35.150 -LoginUserName root -Password config
 
                        ResultMessage ReturnValue
                        ------------- -----------
                        Operation is successful. The host is connected successfully. 0
                     
            Step 6 -> Run following Cmdlet to check if the Remote host added or not.
                 
                    # Get-QLGCManagedRemoteHost
                     
                    -> Run the desired Cmdlets on both windows local and remote Linux host systems simultaneously.
                    -> User can disconnect the remote host by using following Cmdlet.
                     
                    # Disconnect-QLGCHost -HostHandle 713990872 -RemoteHost 172.28.35.150
                     
            Notes:
            1] If the operation fails and return 0x70000001, it may be because of the system password entered during ConnectHost instead of agent password.
            2] The parameter "HostHandle" is host Handle of Local Host system and user can get it by executing the Cmdlet "Get-QLGCManagedLocalHost".
            3] This Cmdlet is not supported on ESXi Host system.
     
 
 
     
    ii) Connecting Remote Host System through CIM Session:
    ------------------------------------------------------
 
         
        a] [Local Windows Host System] --> [Remote Windows Host System]:
        ----------------------------------------------------------------
 
        - Use the following procedure to connect to a remote Windows host system
        with QLogic FastLinQ 34xx/84xx/45xxx adapter family which has the WMIv2
        provider already installed or alternatively have QLNX-Agent installed.
         
            Step 1 -> Install the latest QLogic FastLinQ PowerKit on Local Windows Host System.
            Step 2 -> Add the Remote Windows Host System to trusted host on Local Windows Host System.
            Example:
                    # winrm set winrm/config/client @{TrustedHosts="172.28.35.225"} --> Run on local Windows machine [in cmd prompt run as admin]
                     
            Step 3 -> Install the latest QLNX-Agent or QLogic FastLinQ PowerKit on Remote Windows Host System.
            Step 4 -> Create the cim session on Local Windows Host System..
             
            Syntax:
                    # $Cred = Get-Credential <UserName with sudo privileges>
                    # $Session = New-CimSession -ComputerName <Host IP address> -Authentication Negotiate -Credential $Cred -OperationTimeoutSec 1200000
                    # Get-CimSession
                 
            Example:
                    # $Cred = Get-Credential Administrator
                    # $Session = New-CimSession -ComputerName 172.28.35.225 -Authentication Negotiate -Credential $Cred -OperationTimeoutSec 1200000
                    # Get-CimSession
                     
            Step 5 -> Run desired Cmdlet using CimSession on Local Windows Host System.
             
            -> Invoke the desired Cmdlet with "-CimSession $Session" option
                 
                    # Get-QLGCAdapter -CimSession $Session
                 
                 
         
        b] [Local Windows Host System] --> [Remote Linux Host System]:
        --------------------------------------------------------------
         
        -> Use the following procedure to connect to a remote Linux host system
        with QLogic FastLinQ 34xx/84xx/45xxx adapter family which has both OMI
        server/CIMOM and OMI provider installed:
             
            Step 1 -> Install OMI server on Remote Linux Host System if not installed earlier.
            Step 2 -> Install latest OMI Provider on Remote Linux Host System.
            Step 3 -> If you are installing the OMI server 1st time follow the below steps.
     
                # /opt/omi/bin/omiserver -s --> To stop OMI Server on remote Linux host machine.
                # /opt/omi/bin/omiserver --httpport 5985 --httpsport 5986 -d --> To start OMI Server and set the http port.
                # /opt/omi/bin/omiserver --> To see status of OMI Server on remote Linux machine.
                     
            Note:
                -> Add firewall exceptions to open up the omiserver ports for remote Cmdlets to talk to the OMI server/OMI provider.
                     
            Step 4 -> Install the latest QLogic FastLinQ PowerKit on Local Windows Host System.
            Step 5 -> Add the Remote Linux Host System to trusted host on Local Windows Host System.
             
            Example:
                    # winrm set winrm/config/client @{TrustedHosts="172.28.35.285"} --> Run on local Windows machine [in cmd prompt run as admin]
 
            Step 6 -> Create the cim session Local Windows Host System.
             
            Syntax:
                    # $Cred = Get-Credential <UserName with sudo privileges>
                    # $Session = New-CimSession -ComputerName <Host IP address> -Authentication Basic -Credential $Cred -OperationTimeoutSec 1200000
                    # Get-CimSession
                 
            Example:
                    # $Cred = Get-Credential root
                    # $Session = New-CimSession -ComputerName 172.28.35.285 -Authentication Basic -Credential $Cred -OperationTimeoutSec 1200000
                    # Get-CimSession
                     
            Step 7 -> Run desired Cmdlet using CimSession on Local Windows Host System..
             
            -> Invoke the desired Cmdlet with "-CimSession $Session" option.
            Examples:
                # Get-QLGCAdapter -CimSession $Session
                 
                 
        c] [Local Windows Host System] --> [Remote ESXi Host System]:
        -------------------------------------------------------------
         
        -> Use the following procedure to connect to a remote ESXi host system
        with QLogic FastLinQ 34xx/84xx/45xxx adapter family which has both SFCB
        server/CIMOM and qlgcfastlinq VMware ESXi provider installed:
                 
            Step 1 -> Install latest qlgcfastlinq VMware-ESXi Provider VIB on Remote ESXi Host System.
            Step 2 -> Reboot the server after installation of Provider VIB.
             
            Other Commands:
                # /etc/init.d/sfcbd-watchdog restart --> To restart SFCB server on remote ESXi machine.
                # /etc/init.d/sfcbd-watchdog stop --> To stop SFCB server on remote ESXi host machine.
                # /etc/init.d/sfcbd-watchdog start --> To start SFCB server.
                     
            Note:
                -> Add firewall exceptions to open up the SFCB ports for remote cmdlets to talk to the SFCB server/provider.
                     
            Step 3 -> Install the latest QLogic FastLinQ PowerKit on Local Windows Host System.
            Step 4 -> Add the Remote ESXi Host System to trusted host on Local Windows Host System.
             
                Example:
                    winrm set winrm/config/client @{TrustedHosts="172.28.35.285"} --> Run on local Windows machine [in cmd propmt run as admin]
 
            Step 5 -> Create the CIM Session as follows on Local Windows Host System.
             
                # $Cred = Get-Credential <UserName with sudo privileges>
                # $CIMOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Usessl
                # $Session = New-CimSession -ComputerName <Host IP address> -Authentication Basic -Credential $Cred $CIMOpt -port 443 -OperationTimeoutSec 1200000
                # Get-CimSession
                 
                Example:
                # $Cred = Get-Credential root
                # $CIMOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Usessl
                # $Session = New-CimSession -Authentication Basic -Credential $Cred -ComputerName "172.28.3.190" -Sessionoption $CIMOpt -port 443 -OperationTimeoutSec 1200000
 
            Step 6 -> Run desired Cmdlet using CimSession on Local Windows Host System..
             
            Examples:
                # Get-QLGCAdapter -CimSession $Session
                -> Invoke the desired Cmdlet with "-CimSession $Session" option.
 
 
 
 
7.(b) Firmware Upgrade Operation:
---------------------------------
 
 
The following is the usage of the Cmdlet "Update-QLGCFirmware" to perform firmware upgrade operation.
 
 
    Update-QLGCFirmware Cmdlet Usage:
    ---------------------------------
     
 
        NAME
        Update-QLGCFirmware
 
        SYNOPSIS
        Update firmware of adapters installed on the system.
 
 
        -------------------------- EXAMPLE 1 --------------------------
 
        PS C:\> Update-QLGCFirmware -UniqueId 2094907635 -FirmwareType MBI -Reset 0 -Force 1 -ImageFile "C:\Users\Administrator\Desktop\ql_mbi_8107.bin"
 
        WARNING: FW Upgrade Successful - Reboot is Required !!
 
        Example Description:
        ====================
 
        The above command takes the following inputs.
 
            UniqueId : Unique Id of Function object. Please get this Unique Id from the Cmdlet "Get-QLGCFunction".
            FirmwareType : Passed value as MBI as Type of firmware to update. User can pass either firmware type value (23) or name (MBI).
            Reset : Passed value as 0 with no device reset.
            Force : Passed value as 1 to do force firmware update.
            ImageFile : The Location of firmware file with absolute path. Please specify this in double quotes.
 
        Notes:
        1] This Cmdlet supports only MBI firmware update.
        2] Please provide the Unique Id of Function object to update firmware on the specific function of adapter.
        The user can get this Unique Id from the Cmdlet "Get-QLGCFunction".
        3] The Firmware update is only supported on Nic/Ethernet function of adapter but not on storage function of adapter.
 
 
 
 
                 
=====================================
8. Available Cmdlets and Description:
=====================================
 
     
    i) The following table consists of list of available Cmdlets.
    ii) User can get the usage/Help of each Cmdlet as follows.
                             
        # Get-Help <Cmdlet_Name> [-Examples | -Detailed | -Full ]
        Example:
                # Get-Help Get-QLGCAdapter
                # Get-Help Get-QLGCAdapter -Examples
                # Get-Help Get-QLGCAdapter -Full
                # Get-Help Get-QLGCAdapter -Detailed
                     
    iii)The user can run the following command on PowerShell Prompt to see list of all available cmdlets after PowerKit installation.
     
        # Get-Module -ListAvailable | Where-Object {$_.Name.StartsWith('QLGC_') } | select name,exportedcommands | Format-Table -Wrap
         
    iv)Please check the Powerkit User guide document for more information.
 
     
     
#---------------------------------------------------------------------------------------------------------------------------#
# S.No #Cmdlet #Description #
#---------------------------------------------------------------------------------------------------------------------------#
 
a]. Generic Adapter Cmdlets:
----------------------------
    1]. Get-QLGCAdapter Retrieves information about one or more Marvell adapters on the system.
    2]. Get-QLGCFunction Retrieves function information about one or more Marvell adapters on the system.
     
    3]. Get-QLGCManagedLocalHost Retrieves Local Host managed information.
     
    4]. Reset-QLGCHost Refreshes the Host by providing the Host IP address.
    5]. Reset-QLGCHandle Refreshes the Host by providing the HostHandle.
 
     
b]. "Connect/Disconnect Remote Host Systems through RPC" Cmdlets:
------------------------------------------------------------------
    6]. Connect-QLGCHost Connects the Remote Windows or Linux Host System.
     
    7]. Disconnect-QLGCHost Disconnects the Remote Windows or Linux host System by providing the Host IP address.
    8]. Disconnect-QLGCHostHandle Disconnects the Remote Windows or Linux host System by providing the HostHandle.
     
    9]. Get-QLGCManagedRemoteHost Retrieves remote host managed information.
    10].Set-QLGCRemoteAgentPassword Sets the password for the remote agent on Remote Host System.
 
    Note:
        "Connect-QLGCHost" Cmdlet is not supported on ESXi host System as RPC is not supported on ESXi.
         
c]. NicPartition (NPAR) - Configuration Cmdlets:
-------------------------------------------------
    11]. Get-QLGCNicPartConfig Retrieves NPAR configuration information of all NPAR-capable Marvell adapters at the adapter level.
    12]. Get-QLGCNicPartPortConfig Retrieves NPAR configuration information at the port level.
    13]. Get-QLGCNicPartFunctionConfig Retrieves NPAR configuration information at the function level.
     
    14]. Save-QLGCNicPartConfigToXML Saves the NPAR configuration for the Adapter at the XML file path mentioned in the input parameter.
    15]. Set-QLGCNicPartConfigFromXML Reads and Sets the NPAR configuration for the Adapter from the XML file path mentioned in the input parameter.
     
 
d]. Firmware and VPD Information and Firmware Update Cmdlets:
-------------------------------------------------------------
 
    i). Firmware Information:
    -------------------------
    12]. Get-QLGCFirmwareInfo Retrieves firmware information about one or more Marvell adapters on the system.
 
    ii). VPD Information:
    ---------------------
    13]. Get-QLGCVPDInfo Retrieves VPD information about one or more Marvell adapters on the system.
     
    iii). Firmware Update:
    ----------------------
    14]. Update-QLGCFirmware Updates the designated firmware component of Marvell adapters installed on the system.
    15]. Update-QLGCAllUsingMBI Updates the monolithic binary image (MBI) across all connected hosts.
 
     
e]. Diagnostic tests Cmdlets:
-----------------------------
    16]. Start-QLGCFuncDiagnostic Runs diagnostic tests at the function level.
                                            NOTE:
                                            Available Tests: CONTROL_REGISTERS_TEST, INTERNAL_MEMORY_TEST, EEPROM_TEST, INTERRUPT_TEST, LOOPBACK_PHYSICAL_TEST, CPU_TEST and LED_TEST.
                                             
f]. SR-IOV Cmdlets:
-------------------
    17]. Get-QLGCSRIOVSwitchInfo Retrieves SR-IOV switch information for all the functions of the valid Marvell adapters.
    18]. Get-QLGCSRIOVSwitchStats Retrieves the SR-IOV switch statistics for all valid NetXtreme II switches.
    19]. Get-QLGCSriovVFInfo Retrieves the SR-IOV virtual functions that are present for supported functions.
     
    20]. Save-QLGCSRIOVConfigToXML Saves the function-wise SRIOV configuration data for given Adapter at the XML file path location specified in the input parameter.
    21]. Set-QLGCSRIOVConfigFromXML Reads and sets the function-wise SRIOV configuration data for given Adapter from the XML file path location specified in the input parameter.
 
     
g]. MBA, FCoE and iSCSI Boot Configuration Cmdlets:
----------------------------------------------------
 
    i). MBA Boot Configuration:
    ---------------------------
    22]. Get-QLGCPhyPortMBACfg Retrieves pre-execution environment (PXE)parameters from NVRAM; for example,OptionRom, wake on LAN (WOL), HotKey, VLanId, and so on
    23]. Save-QLGCMBABootConfigToXML Saves the MBA Boot configuration data for given Port at the XML file path location specified in the input parameter.
    24]. Set-QLGCMBABootConfigFromXML Reads and sets the MBA Boot configuration data for given Port from the XML file path location specified in the input parameter.
     
    ii). FCoE Boot Configuration:
    -----------------------------
    25]. Get-QLGCFCoEBootConfigInfo Retrieves the FCoE boot from SAN configuration(CFG) block from the NVRAM for Marvell adapters.
    26]. Save-QLGCFCoEBootConfigToXML Saves the FCoE Boot configuration data for given FCoE Function at the XML file path location specified in the input parameter.
    27]. Set-QLGCFCoEBootConfigFromXML Reads and Sets the FCoE Boot configuration data for given FCoE Function from the XML file path location specified in the input parameter.
                                            NOTE:-> The input parameter PhyPortHandle must be to a physical NIC/VBD.
    iii). iSCSI Boot Configuration:
    -------------------------------
    28]. Get-QLGCiSCSIBootCfg Retrieves iSCSI boot from SAN configuration from NVRAM for Marvell adapters
    29]. Save-QLGCiSCSIBootConfigToXML Saves the iSCSI Boot configuration data for given iSCSI function at the XML file path location specified in the input parameter.
    30]. Set-QLGCiSCSIBootConfigFromXML Reads and sets the iSCSI Boot configuration data for given iSCSI function from the XML file path location specified in the input parameter.
 
     
h]. QinQ (VLAN Configuration)Cmdlets:
-------------------------------------
    31]. Save-QLGCVLANConfigToXML Saves the VLAN config Data for the given Adapter at the XML file path mentioned in the input parameter.
    32]. Set-QLGCVLANConfigFromXML Reads and Sets the VLAN config Data for the given Adapter from the XML file path mentioned in the input parameter.
                                            NOTE: -> Supported for E3 family only.
 
                                             
i]. PortMode, SmartAN and NDIS AdvancedParameters Cmdlets:
----------------------------------------------------------
 
    i). PortMode Conversion Option:
    -------------------------------
    33]. Get-QLGCAdapterAdvancedParameter Retrieves the adapter parameters of the Marvell adapters on the system
    34]. Save-QLGCAdapterAdvancedParametersToXML Saves the PortMode data for given Adapter at the XML file path location specified in the input parameter.
    35]. Set-QLGCAdapterAdvancedParametersFromXML Reads and sets the PortMode data for given Adapter from the XML file path location specified in the input parameter.
                                                    NOTE: -> Supported only on Few E4 Family Adapters.
                                                            -> The XML contains the Valid supported values
                                                            -> Supported only on Few E4 family Adapters.
    ii). SmartAN Advanced Parameters:
    ---------------------------------
    36]. Get-QLGCPortAdvancedParameter Retrieves link setting information for the specified port.
    37]. Save-QLGCPortAdvancedConfigParamsToXML Saves the Port Level Advanced Parameter data (SmartAN) for given Physical Port at the XML file path location specified in the input parameter.
    38]. Set-QLGCPortAdvancedConfigParamsFromXML Reads and sets the Port Level Advanced Parameter data (SmartAN) for given Physical
                                                    NOTE: -> Port from the XML file path location specified in the input parameter.
                                                            -> Supported for E4 family only [ 25G and Above]
                                                            -> The XML file contains the list of supported value-sets for each parameter.
    iii). NDIS Advanced Parameters:
    -------------------------------
    39]. Get-QLGCNdisAdvancedParameter Retrieves NIC parameter information.
    40]. Save-QLGCNdisAdvancedParametersToXML Saves the Ndis Advanced Parameters data along with the supported values for given Ndis Function at the XML file path location specified in the input parameter.
    41]. Set-QLGCNdisAdvancedParametersFromXML Reads and Sets the Ndis Advanced Parameters data along with the supported values for given Ndis Function from the XML file path location specified in the input parameter.
                                                    NOTE: -> The XML file contains the list of supported value-sets for each parameter.
 
j]. Resource Configuration Cmdlets:
-----------------------------------
    42]. Get-QLGCTransceiverInfo Retrieves information about the transceiver used for the physical port.
 
 
k]. Resource configuration Cmdlets:
-------------------------------------
    43]. Get-QLGCResCfg Retrieves resource configuration parameters of the specified adapter.
    44]. Set-QLGCResCfg Sets the resource configuration parameters of the specific NIC.
                                                NOTE:
                                                    -> The parameters are related to iSCSI, FCoE, RDMA, TCP/IP offload engine (TOE), and so on.
                                                    -> This Cmdlet is supported only on Windows host systems.
                                                    -> TOE, iSCSI, and FCoE can only be configured on certain adapters and require a license key. License keys are preprogrammed in the hardware.
 
l]. FCoE Cmdlets:
------------------
    45]. Get-QLGCFCoE Retrieves information about one or more FCoE functions of the Marvell adapters installed on the system
     
    46]. New-QLGCVNPort Creates a new virtual port
    47]. Get-QLGCVNPort Retrieves information about all the FCoE virtual ports (VPs) present on the system.
    48]. Remove-QLGCVNPort Deletes an existing virtual port.
     
    49]. Get-QLGCFCoEGeneralConfig Retrieves general time-out configuration information about one or more FCoE functions of Marvell adapters installed on the system
    50]. Save-QLGCFCoEGeneralConfigToXML Saves the FCoE General Configuration data for given FCoE Function at the XML file path location specified in the input parameter.
    51]. Set-QLGCFCoEGeneralConfigFromXML Read and Sets the FCoE General Configuration data for given FCoE Function from the XML file path location specified in the input parameter.
                                                NOTE: -> This Cmdlet is supported only on Windows systems.
     
    52]. Get-QLGCFCoELun Retrieves LUN information about one or more FCoE LUNs configured on the system.
    53]. Get-QLGCFCoEStats Retrieves run-time statistics for the FCoE protocol.
    54]. Get-QLGCFCoETarget FCoE targets configured on the QLogic/Marvell adapters installed on the system.
     
     
 
l]. iSCSI Cmdlets:
-------------------
    55]. Get-QLGCiSCSI Retrieves information about one or more iSCSI devices of Marvell adapters installed on the system.
     
    56]. Save-QLGCiSCSIConfigParamsToXML Saves the iSCSI General Configuration data (like MTU,IPAddress) for given iSCSI Function at the XML file path location specified in the input parameter.
    57]. Set-QLGCiSCSIConfigParamsFromXML Reads and Sets the iSCSI General Configuration data for given iSCSI Function from the XML file path location specified in the input parameter.
                                                Note: -> Supported only on Windows.
                                                 
    58]. Get-QLGCIfaceFileInfo Retrieves information about one or more iface files configured on the system.
    59]. Start-QLGCCreateOrModifyifaceFile Creates a new iface file or modifies an existing iface file.
                                                NOTE: -> This Cmdlet is supported only on Linux systems.
                                                 
    60]. Start-QLGCiSCSIDiagnostic Checks connectivity from the iSCSI device to an iSCSI target.
     
    61]. Get-QLGCiSCSITarget Retrieves information about one or more iSCSI targets configured on Marvell adapters installed on the system
    62]. Start-QLGCiSCSILoginToTarget Logs into an iSCSI target.
    63]. Start-QLGCiSCSILogout Logs out of an iSCSI target.
     
    64]. Get-QLGCiSCSIConnection Retrieves connection information about one or more iSCSI devices of Marvell adapters installed on the system.
    65]. Get-QLGCiSCSIIpv4Addresses Retrieves information about one or more iSCSI IPv4 addresses of iSCSI devices found on the system.
    66]. Get-QLGCiSCSIIpV6Addresses Retrieves information about one or more iSCSI IPv6 addresses of iSCSI devices found on the system.
    67]. Get-QLGCiSCSILun Retrieves information about one or more iSCSI LUNs configured on one or more iSCSI targets connected to Marvell adapters installed on the system.
    68]. Get-QLGCiSCSINegotiationInfo Retrieves negotiation information about one or more iSCSI devices of Marvell adapters installed on the system.
    69]. Get-QLGCiSCSISession Retrieves information about one or more iSCSI sessions of Marvell adapters installed on the system connecting to one or more iSCSI targets.
     
    70]. Get-QLGCLicenseInfo Retrieves specific license information for the adapter.
     
    71]. Get-QLGCiSCSIPortal Retrieves information about iSCSI portals. The list includes target portals and initiator portals.
    72]. Add-QLGCDiscoveryPortal Adds a discovery portal.
    73]. Remove-QLGCDiscoveryPortal Removes a discovered portal.
     
    74]. Add-QLGCiSCSIStaticTarget Adds a static target.
    75]. Remove-QLGCiSCSIStaticTarget Removes a static target.
     
    76]. Add-QLGCiSNSServer Adds an iSNS server.
    77]. Reset-QLGCiSNSServer Refreshes/Resets the iSNS serverThis Cmdlet is supported only on Windows systems.
    78]. Get-QLGCiSNSServers Retrieves information about one or more iSNS servers.
    79]. Remove-QLGCiSNSServer Removes/Disables an iSNS server connection.
 
m]. Nic Cmdlets:
-----------------
    80]. Get-QLGCNic Retrieves information about one or more NIC functions of Marvell adapters installed on the system.
     
    81]. Get-QLGCNicParameter Retrieves information about VBD advanced parameters of Marvell adapters installed on the system.
    82]. Save-QLGCNicParametersToXML Saves the NIC[VBD] Function Level Advanced Parameter data for given Function at the XML file path location specified in the input parameter.
    83]. Set-QLGCNicParametersFromXML Reads and sets the NIC Function Level [VBD] Advanced Parameter data for given Function from the XML file path location specified in the input parameter.
                                                Notes: -> Applicable to Windows Only.
                                                 
    84]. Start-QLGCNicDiagnostic Pings an IP address.
    85]. Get-QLGCNdisStatsInfo Retrieves the NIC statistics of Marvell adapters installed on system.
    86]. Get-QLGCParamValueDesc Retrieves the NIC statistics of Marvell adapters installed on system.
     
     
n]. Phy Port and LLDP Cmdlets:
------------------------------
    87]. Get-QLGCPhyPort Retrieves information about one or more physical ports of Marvell adapters installed on the system.
    86]. Get-QLGCPhyPortDCBXInfo Retrieves DCBX information about one or more physical ports of Marvell adapters installed on the system.
    89]. Get-QLGCPhyPortLLDPConfig Retrieves LLDP configuration parameters of the specified NIC port.
    90]. Set-QLGCPhyPortLLDPConfig Sets the LLDP configuration parameters of the specific NIC port,
                                                for example, MsgTx-Interval, MsgFastTx, TxCreditMax, TxFast,MsgTxHold, and OverwriteSettings.
    91]. Get-QLGCPhyPortStats Retrieves DCBX statistics.
    92]. Get-QLGCPortLLDPInfo Retrieve LLDP parameters of the NIC Port.
 
     
n]. Local and Remote Host Adapter Multiple Configurations Cmdlets:
------------------------------------------------------------------
     
    93]. Save-QLGCRemoteHostAdapterConfigsToXML Helps user to save configurations in XML file such as MBA Boot cfg, FCoE Boot cfg, iSCSI Boot cfg,
                                                    NPAR cfg, Ndis advanced parameters and SRIOV on specified adapter of desired remote host systems.
    94]. Set-QLGCRemoteHostAdapterConfigsFromXML Helps user to set configurations from given XML file such as MBA Boot cfg, FCoE Boot cfg, iSCSI Boot cfg,
                                                    NPAR cfg, Ndis parameters and SRIOV on specified adapter remote host systems.
                                                     
    95]. Save-QLGCMultipleConfigDataXMLs Helps user to save NPAR, SmartAN(TM), MBA Boot Config, NDIS advance params at user provided location for Local Host for all applicable instances(Adapters, Ports and Functions).
     
o]. Link and MFW Crash Dump Cmdlets:
-------------------------------------
     
    96]. Get-QLGCLinkDumpInfo Helps user to get information of Link Dump of QLogic/Marvell adapters installed on the system.
                                                    NOTE: This Cmdlet is supported only for E4 family of adapters.
    97]. Save-QLGCMFWCrashDumpToFile Helps user to retrieve MFW crash dump for only Windows OS.
 
o]. Event data Cmdlet:
----------------------
     
    98]. Get-QLGCEventData Provides Event data when the user performs set config operations by using Powerkit (or) other Marvell/QLogic tools which requires "Refresh" to get latest data.
                                                    Displays blank if no data is available.
     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
Notes:
------
 
The following Cmdlets are deprecated and replaced with new equivalent Cmdlets.
 
#===================================================================================#
# Deprecated Old Cmdlets Equivalent New Cmdlet #
#===================================================================================#
#1. Set-QLGCFCoEGeneralConfig Set-QLGCFCoEGeneralConfigFromXML #
#2. Set-QLGCFunction Set-QLGCSRIOVConfigFromXML #
#3. Set-QLGCiSCSI Set-QLGCiSCSIConfigParamsFromXML #
#4. Set-QLGCNdisAdvancedParameter Set-QLGCNdisAdvancedParametersFromXML #
#5. Set-QLGCNicParameter Set-QLGCNicParametersFromXML #
#6. Set-QLGCPortAdvancedParameter Set-QLGCPortAdvancedConfigParamsFromXML #
#7. Set-QLGCAdapterAdvancedParameter Set-QLGCAdapterAdvancedParametersFromXML #
#8. Set-QLGCNicPartPortConfig Set-QLGCNicPartConfigFromXML #
#9. Set-QLGCNicPartFunctionConfig Set-QLGCNicPartConfigFromXML #
#10.Set-QLGCNPARConfiguration Set-QLGCNicPartConfigFromXML #
#11.Set-QLGCiSCSIBootConfiguration Set-QLGCiSCSIBootConfigFromXML #
#12.Set-QLGCMBAConfiguration Set-QLGCMBABootConfigFromXML #
#13.Set-QLGCFCoEBootConfiguration Set-QLGCFCoEBootConfigfromXML #
#14.Set-QLGCFCoEBootConfigInfo Set-QLGCFCoEBootConfigfromXML #
#15.Set-QLGCPhyPortMBACfg Set-QLGCMBABootConfigFromXML #
#16.Set-QLGCiSCSIBootCfg Set-QLGCiSCSIBootConfigFromXML #
#17.Set-NicPartConfig Set-QLGCNicPartConfigFromXML #
#18.Start-CreateOrModifyifaceFile Start-QLGCCreateOrModifyifaceFile #
#===================================================================================#
 
 
 
===============================================
9. Steps to use PowerShell Cmdlets with ansible
===============================================
 
Steps to use PowerShell Cmdlets with ansible on Linux , Windows and VMware Host.
 
a] Prerequisites :
------------------
 
    1. Make sure on Linux Server (In my case Centos 7.5), ansible and related rpms/installer are there.
 
    2. Check that on Windows host , port 5885 (for HTTP) and 5886 ( for HTTPS) are in listening mode.
        Please refer link https://docs.ansible.com/ansible/2.5/user_guide/windows_setup.html for setting up Windows host with winrm.
 
    3. QLogic FastLinQ PowerKit be installed properly on the Windows system from which you plan to manage the local/remote
        Windows, Linux and ESXi host system with QLogic FastLinQ 34xx/84xx/45xxx adapter family.
         
    4. Appropriate device driver for the QLogic NIC is to be installed on the host system that is to be managed by
        the QLogic FastLinQ PowerKit.
         
    5. OmiServer must be installed prior to installing the OMI provider on host Linux systems.
         
    6. For managing iscsi on Linux hosts, open-iscsi and sg utilities are required to be installed on the Linux host.
         
    7. Microsoft iSCSI initiator be installed on the Windows host server.
 
 
b] Cmdlets usage on Windows Host/Client:
----------------------------------------
 
Topology :
--------
 
- Windows Host/Client : User will save mba configuration file on Marvell Adapter.
- Linux Server : Centos -7.5 - Ansible installer / Initiate ansible-playbook
 
 
Setup Windows Host/Client :
---------------------------
 
1. Make sure on Windows Host , where you would like to connect from ansible server ( Linux - Centos 7.5), having installed with
OMI-Provider (InstallFastLinqPowerKit.ps1) provided by Marvell
 
2. Run Get-QLGCPhyPortMBACfg" on powerShell command to get UniqueID Handle to save mba boot config.
 
 
Setup Linux Server:
-------------------
 
    1. Create directory ansible_usage
 
$ mkdir -p ansible_usage
 
    2. create hosts file with below contents :
 
$ cd ansible_usage
$ cat hosts
 
[win]
<Windows HOST IP Address>
 
[win:vars]
ansible_user=<Windows Host User>
ansible_password=<Windows Host Password>
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
 
    3. create scripts folder, where user is keeping powerShell script to run on Windows machine
 
        $ mkdir -p scripts
 
    4. create XML folder, where user is keeping xml files, which would like to set on Marvell Adapters on Windows machine.
 
$ mkdir -p xml
 
    5. Below is example powerShell script, to change mba boot configuration of Marvell Adapter on Windows machine.
 
 
        5.1. Save mba.xml file in xml folder as shown below
 
    $ cat xml/mba.xml file
         
        <MBAConfiguration>
        <OptionROM>Enabled</OptionROM>
        <BootProtocol>None</BootProtocol>
        <HideSetupPrompt>Disabled</HideSetupPrompt>
        <SetupKeyStroke>Ctrl-S</SetupKeyStroke>
        <BannerMessageTimeout>15</BannerMessageTimeout>
        <LinkSpeed>SmartAN</LinkSpeed>
        <Pre-bootWakeonLAN>Disabled</Pre-bootWakeonLAN>
        <VLANmode>Enabled</VLANmode>
        <VLANID>0</VLANID>
        <BootRetryCount>0</BootRetryCount>
        </MBAConfiguration>
 
    5.2. Write PowerShell script to Save MBA file on Marvell Adapter on Windows HOST.
 
    $ cat scripts/mba-save-windows.ps1
         
        Set-QLGCMBABootConfigFromXML -UniqueId <UNIQUEID> -MBABootConfigXMLFile C:\scratch\mba.xml
 
        where you can use UNIQUE-ID number got it from Windows Host using "Get-QLGCPhyPortMBACfg"
         
         
    5.3. Write YAML file which would like to run from Linux Host to copy xml file on Windows host and
            run mba-save-windows.ps1
 
    $ cat powershell.yaml
 
        - name: Copy files
        hosts: win
        tasks:
        - name: copy xml file to Windows host
            copy:
            src: /root/ansible_ps/xml/mba.xml
            dest: C:\scratch\
 
        - name: Run PowerShell script
        hosts: win
        tasks:
        - name: run powershell script to update xml
            script: scripts/mba-save-windows.ps1
            register: out
        - debug: var=out
 
 
    6. Run ansible script from Linux Server with below command
 
        ansible-playbook -i hosts powershell.yaml
 
 
Cmdlets usage on Linux or VMware Host:
======================================
 
Topology :
 
- Linux Host/Client or VMware : User will save mba configuration file on Marvell Adapter.
- Windows Host : From where CIM session will be establish on Linux Client
- Linux Server : Centos -7.5 - Ansible installer / Initiate ansible-playbook
 
 
Setup Linux/VMware Client :
---------------------------
 
    1. if Linux Host/Client OS, Make sure OMI server/CIMOM is installed :
 
    Follow below link for further details on OMI server/CIMOM:
    https://collaboration.opengroup.org/omi/
 
    2. Install "QLGC_OMIProvider-x.y.zz.x86_64.rpm" on Linux Client OS
 
    3. Run OMI server with below steps for Linux
        - If you are installing the OMI server 1st time follow the below steps.
                /opt/omi/bin/omiserver -s --> Stop OMI Server (on Linux machine)
                /opt/omi/bin/omiserver --httpport 5985 --httpsport 5986 -d --> Start OMI Server and set the http port.
 
        (Above commands to be executed if we are doing it for the first time, next time use only below command to execute omi server)
                /opt/omi/bin/omiserver
 
 
    or
 
 
    1. If Client is VMware, then install "vmware-esx-provider-qlgcfastlinq" on VMware Host/Client.
 
 
Setup Windows Host:
-------------------
 
1. Make sure on Windows Host , where you would like to connect from ansible server ( Linux - Centos 7.5), having installed with
OMI-Provider (InstallFastLinqPowerKit.ps1) provided by Marvell
 
2. Add Linux Client IP address as Trusted host from Windows Host:
 
winrm set winrm/config/client @{TrustedHosts="<Linux Client IP address>"}
 
3. Run Get-QLGCPhyPortMBACfg" on powerShell command to get UniqueID Handle to save mba boot config on Linux / VMware Client with below commands.
 
$secpasswd = ConvertTo-SecureString "<Linux or VMware Client Password>" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ("<Linux or VMware Client User name>", $secpasswd)
$session = New-CimSession -Authentication Basic -Credential $mycreds -ComputerName "<Linux or VMware Client IP address>" -OperationTimeoutSec 1200000
Get-QLGCPhyPortMBACfg -CimSession $session
 
     
Setup Linux Server:
-------------------
 
    1. Create directory ansible_usage
 
    $ mkdir -p ansible_usage
 
    2. create hosts file with below contents ( Here we Need to connect to Window Machine) :
 
    $ cd ansible_usage
    $ cat hosts
     
        [win]
        <Windows HOST IP Address>
 
        [win:vars]
        ansible_user=<Windows Host User>
        ansible_password=<Windows Host Password>
        ansible_connection=winrm
        ansible_winrm_server_cert_validation=ignore
 
        [lin]
        <Linux HOST IP Address>
 
        [lin:vars]
        ansible_user=<Linux Host User>
        ansible_password=<Linux Host Password>
        ansible_connection=ssh
        ansible_winrm_server_cert_validation=ignore
 
 
        [esx]
        <VMware HOST IP Address>
 
        [esx:vars]
        ansible_user=<VMware Host User>
        ansible_password=<VMware Host Password>
        ansible_connection=ssh
        ansible_winrm_server_cert_validation=ignore
 
    3. create scripts folder, where user is keeping powershell script to run on Windows Host.
 
    $ mkdir -p scripts
     
    4. create XML folder, where user is keeping xml files, which would like to set on Marvell Adapters on Linux/VMware Client.
 
    $ mkdir -p xml
 
    5. Below is example powerShell script, to change mba boot configuration of Marvell Adapter on Linux/VMware Client.
 
    5.1. Save mba.xml file in xml folder as shown below
 
    $ cat xml/mba.xml file
         
        <MBAConfiguration>
        <OptionROM>Enabled</OptionROM>
        <BootProtocol>None</BootProtocol>
        <HideSetupPrompt>Disabled</HideSetupPrompt>
        <SetupKeyStroke>Ctrl-S</SetupKeyStroke>
        <BannerMessageTimeout>15</BannerMessageTimeout>
        <LinkSpeed>SmartAN</LinkSpeed>
        <Pre-bootWakeonLAN>Disabled</Pre-bootWakeonLAN>
        <VLANmode>Enabled</VLANmode>
        <VLANID>0</VLANID>
        <BootRetryCount>0</BootRetryCount>
        </MBAConfiguration>
 
    5.2. Write PowerShell script to Save MBA file on Marvell Adapter on Linux/VMware HOST.
 
    $ cat scripts/mba-save-Linux.ps1
         
        $secpasswd = ConvertTo-SecureString "<Linux or VMware Client Password>" -AsPlainText -Force
        $mycreds = New-Object System.Management.Automation.PSCredential ("<Linux or VMware Client User name>", $secpasswd)
        $session = New-CimSession -Authentication Basic -Credential $mycreds -ComputerName "<Linux or VMware Client IP address>" -OperationTimeoutSec 1200000
        Set-QLGCMBABootConfigFromXML -CimSession $session -UniqueId <UNIQUEID> -MBABootConfigXMLFile /root/scratch/mba.xml
         
    5.3. Write YAML file which would like to run from Linux Server to copy xml file on Linux host/Client and
            run mba-save-Linux.ps1
 
    $ cat powerShell.yaml
 
        - name: Copy files
        hosts: lin --> If host is VMware then provide "esx" here.
        tasks:
        - name: copy xml file to Linux/VMware host
            copy:
            src: /root/ansible_ps/xml/mba.xml
            dest: /root/scratch/
 
        - name: Run PowerShell script
        hosts: win
        tasks:
        - name: run powerShell script to update xml
            script: scripts/mba-save-Linux.ps1
            register: out
        - debug: var=out
 
 
    6. Run ansible script from Linux Server with below command
 
    $ ansible-playbook -i hosts powershell.yaml
 
 
 
 
================
10. Known Issues:
================
 
         
    a]. Unable to add iSNS server to Windows 2016 Nano server.
         
    b]. Unable to login to targets with iSCSI CHAP on Linux.
         
    c]. Diagnostics fails on Windows 2016 Nano server.
         
    d]. The Following Set-Operations (modify Instance) are not supported on ESXi Host system.
        1] Set-QLGCResCfg
        2] Set-QLGCPhyPortLLDPConfig