PowerCLI

 View Only
Expand all | Collapse all

Install a VIB via PowerCLI

  • 1.  Install a VIB via PowerCLI

    Posted Jul 30, 2014 03:10 PM

    I am having some trouble installing a VIB (HP HSPA driver) via PowerCLI.. can someone tell me what I am missing here? Thanks!

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Esxcli -vmHost xx

    ===========================

    EsxCli: xx

       Elements:

       ---------

       device

       esxcli

       fcoe

       graphics

       hardware

       iscsi

       network

       sched

       software

       storage

       system

       vm

       vsan

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $hspavibpath="/vmfs/volumes/xx/scsi-hpsa-5.5.0.60-1OEM.550.0.0.1331820.x86_64

    .vib"

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib.install($hspavibpath)

    You cannot call a method on a null-valued expression.

    At line:1 char:29

    + $esxcli.software.vib.install <<<< ($hspavibpath)

        + CategoryInfo          : InvalidOperation: (install:String) [], RuntimeException

        + FullyQualifiedErrorId : InvokeMethodOnNull

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>



  • 2.  RE: Install a VIB via PowerCLI

    Posted Jul 30, 2014 03:42 PM

    Are you connected to the ESXi server, and not the vCenter ?

    See Re: Installing driver vib with get-esxcli



  • 3.  RE: Install a VIB via PowerCLI

    Posted Jul 30, 2014 03:44 PM

    Yeah.. that was actually my first mistake :smileyhappy:



  • 4.  RE: Install a VIB via PowerCLI

    Posted Jul 30, 2014 03:51 PM

    Does

    $esxcli.software.vib.list()

    work and return anything ?



  • 5.  RE: Install a VIB via PowerCLI

    Posted Jul 30, 2014 03:52 PM

    Just noticed, you have to pass $null for the other parameters on the method.

    See the other thread I linked to



  • 6.  RE: Install a VIB via PowerCLI

    Posted Jul 30, 2014 03:58 PM

    I get this same error.. How do I know how many $null entries I need?

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib.list()

    You cannot call a method on a null-valued expression.

    At line:1 char:26

    + $esxcli.software.vib.list <<<< ()

        + CategoryInfo          : InvalidOperation: (list:String) [], RuntimeException

        + FullyQualifiedErrorId : InvokeMethodOnNull



  • 7.  RE: Install a VIB via PowerCLI

    Posted Jul 30, 2014 04:51 PM

    If you do

    $esxcli.software.vib.install.OverloadDefinitions

    it will list all the parameters.

    And you can count/copy them from the other thread



  • 8.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 12:26 PM

    I get nothing back when I run that command

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib.install

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>



  • 9.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 12:46 PM

    Sorry, should have been

    $esxcli.software.vib.install.OverloadDefinitions

    But why don't you just copy the parameters from that other thread, it is the same type of method call ?



  • 10.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 01:07 PM

    Still nothing..

    Name                           Port  User

    ----                           ----  ----

    x                           443   root

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib.install.OverloadDefinitions

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>

    I tried copying the parameters.. same error.

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Esxcli -vmHost x

    ===========================

    EsxCli: x

       Elements:

       ---------

       device

       esxcli

       fcoe

       graphics

       hardware

       iscsi

       network

       sched

       software

       storage

       system

       vm

       vsan

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $hspavibpath="/vmfs/volumes/x/scsi-hpsa-5.5.0.60-1OEM.550.0.0.1331820.x86_64

    .vib"

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib.install($null,$null,$null,$null,$null,$null,$null,$null,$hspav

    ibpath)

    You cannot call a method on a null-valued expression.

    At line:1 char:29

    + $esxcli.software.vib.install <<<< ($null,$null,$null,$null,$null,$null,$null,$null,$hspavibpath)

        + CategoryInfo          : InvalidOperation: (install:String) [], RuntimeException

        + FullyQualifiedErrorId : InvokeMethodOnNull

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>



  • 11.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 01:15 PM

    Is that against an ESXi 5.5 server ?

    Can you try the following, and see where it fails

    $esxcli

    $esxcli.software

    $esxcli.software.vib



  • 12.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 01:20 PM

    All I get is a blank like on each.. lol

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>



  • 13.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 01:25 PM

    That would mean that your Get-EsxCli did not work correctly.

    You did do a

    $esxcli = Get-EsxCLi -VMHost MyESXi



  • 14.  RE: Install a VIB via PowerCLI

    Posted Jul 31, 2014 01:36 PM

    HA! *facepalm*

    Making progress now.. I think the issue is I am not sure what parameters I need to define for this vib.. i.e. all the nulls

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli = Get-EsxCLi -VMHost x

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $hspavibpath="/vmfs/volumes/x/scsi-hpsa-5.5.0.60-1OEM.550.0.0.1331820.x86_64

    .vib"

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $esxcli.software.vib.install($null,$null,$null,$null,$null,$null,$null,$null,$hspav

    ibpath)

    Message        : Host is not changed.

    RebootRequired : false

    VIBsInstalled  :

    VIBsRemoved    :

    VIBsSkipped    : {Hewlett-Packard_bootbank_scsi-hpsa_5.5.0.60-1OEM.550.0.0.1331820}

    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>



  • 15.  RE: Install a VIB via PowerCLI

    Posted Aug 03, 2016 08:01 PM

    Hello. I tried with that code and work succesfully

    first..i leave my bundle vib on a datastore, to be access for all my host

    then set the variable $ZIP with the path

    $zip="/vmfs/volumes/TEMPLATES_WINDOWS_BUETY/VIB/QLG-NetXtremeII-6.0-offline_bundle-3234961.zip"

    and for the last use this command

    $esxcli.software.vib.install($zip, $null, $null, $null, $null, $null, $null, $null, $null)

    and.. Bingo!!!

    PowerCLI D:\> $esxcli.software.vib.install($zip, $null, $null, $null, $null, $null, $null, $null, $null)

    Message        : The update completed successfully, but the system needs to be

                     rebooted for the changes to be effective.

    RebootRequired : true

    VIBsInstalled  : {QLogic_bootbank_misc-cnic-register_1.712.70.v55.1-1OEM.550.0.

                     0.1331820,

                     QLogic_bootbank_net-bnx2_2.2.5k.v55.1-1OEM.550.0.0.1331820, QL

                     ogic_bootbank_net-bnx2x_2.712.70.v55.3-1OEM.550.0.0.1331820, Q

                     Logic_bootbank_net-cnic_2.712.70.v55.3-1OEM.550.0.0.1331820...

                     }

    VIBsRemoved    : {Broadcom_bootbank_misc-cnic-register_1.710.30.v55.1-1OEM.550.

                     0.0.1331820,

                     Broadcom_bootbank_net-bnx2_2.2.5f.v55.6-1OEM.550.0.0.1331820,

                     Broadcom_bootbank_net-bnx2x_2.710.39.v55.2-1OEM.550.0.0.133182

                     0, Broadcom_bootbank_net-cnic_2.710.35.v55.5-1OEM.550.0.0.1331

                     820...}

    VIBsSkipped    :