VMware Cloud Community
ankitj
Contributor
Contributor

How to import offline bundle (zip format) into patch repository under vCenter Update Manager v6.5 using PowerCLI

Hi all

Deployed vCenter Server v6.5 with Update manager.

I have another windows machine where VMware PowerCli v5.8  is deployed ,Now i want to import some 3rd party offline bundle which is in zip format into vCenter Update Manager Patch repository .

How can i achieve this through VMware PowerCLi .

In Graphical mode its easy Go To VMware Update Manager ==> manage ==> Patch Repository ==> Import Patchs ==> Upload patch and done,but unable to achieve this through PowerCLI.

Thanks

Ankit Jain

Reply
0 Kudos
14 Replies
LucD
Leadership
Leadership

To work with Update Manager 6.5 (I guess you run that one), you would first need to update to PowerCLI 6.5.1.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
ankitj
Contributor
Contributor

LucD,

     updated the powercli to 6.5.1,can you please provide me the commands to import offline bundle.

Reply
0 Kudos
LucD
Leadership
Leadership

Can you confirm that you are using Update Manager 6.5?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
ankitj
Contributor
Contributor

PowerCli Version

PowerCLI C:\> Get-PowerCLIVersion

PowerCLI Version

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

   VMware PowerCLI 6.5 Release 1 build 4624819

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

Component Versions

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

   VMware Cis Core PowerCLI Component 6.5 build 4624453

   VMware VimAutomation Core PowerCLI Component 6.5 build 4624450

   VMWare ImageBuilder PowerCLI Component 6.5 build 4561891

   VMWare AutoDeploy PowerCLI Component 6.5 build 4561891

   VMware Vds PowerCLI Component 6.5 build 4624695

   VMware Cloud PowerCLI Component 6.5 build 4624821

   VMware HA PowerCLI Component 6.0 build 4525225

   VMware HorizonView PowerCLI Component 7.0.2 build 4596620

   VMware Licensing PowerCLI Component 6.5 build 4624822

   VMware PCloud PowerCLI Component 6.5 build 4624825

   VMware Storage PowerCLI Component 6.5 build 4624820

   VMware vROps PowerCLI Component 6.5 build 4624824

   VMware vSphere Update Manager PowerCLI 6.5 build 4540462

vCenter Server Version :-

pastedImage_1.png

Reply
0 Kudos
LucD
Leadership
Leadership

Oops, I forgot, but uploading to the Update Manager repository via a PowerCLI cmdlet does not work for now.

You'll have to do that via the Web Client.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
ankitj
Contributor
Contributor

thanks for update..is there any other way to achieve this ,other then powercli.

Reply
0 Kudos
LucD
Leadership
Leadership

Only via the Web Client afaik.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
ankitj
Contributor
Contributor

Attached script i was using with vCenter 5.5 and 6.0 and it was working fine and uploading the zip driver to patch repository of update manager ,but after upgrading to vCenter and update Manager to 6.5 it giving below error, any hint on this would be great

## Importing Package...

Start import of patches from file 'C:\import\cross_vmware-esx-drivers-4.3.1.823.406165-offline-bundle.zip' to server 'XYZ.com'.

Exception calling "ImportFile_Task" with "2" argument(s):

"integrity.fault.FileUploadUnsupportedFileLocation"At C:\jenkins\workspace\promoted-hourly-E

SX-bryce-VUM-scsi-esx_6\nodes\esx-vum-65\esx\vum55\vum-import.ps1:53 char:2

+     $taskMoRef = $vumWebService.ImportFile_Task($vumServiceContent.fileUploadManage ...

+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : SoapException

Reply
0 Kudos
ankitj
Contributor
Contributor

Also after upgrading to PowerCLI 6.5.1 getting below error

Add-PSSnapin : The Windows PowerShell snap-in 'VMware.VimAutomation.Core' is not installed

on this computer.At C:\jenkins\workspace\promoted-hourly-ESX-bryce-VUM-scsi-esx_6\nodes\esx-

vum-65\esx\vum55\vum-import.ps1:5 char:1

+ Add-PSSnapin VMware.VimAutomation.Core

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (VMware.VimAutomation.Core:String) [Add-PSSn

   apin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinComm

   and

Add-PSSnapin : Cannot load Windows PowerShell snap-in VMware.VumAutomation because of the

following error: Could not load file or assembly 'file:///C:\Program Files

(x86)\VMware\Infrastructure\vSphere PowerCLI\VMware.VumAutomation.dll' or one of its

dependencies. The system cannot find the file specified. At C:\jenkins\workspace\promoted-hou

rly-ESX-bryce-VUM-scsi-esx_6\nodes\esx-vum-65\esx\vum55\vum-import.ps1:6 char:1

+ Add-PSSnapin VMware.VumAutomation

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidData: (VMware.VumAutomation:String) [Add-PSSnapin], PS

   SnapInException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinComm

   and

Reply
0 Kudos
ankitj
Contributor
Contributor

Also after upgrading to PowerCLI 6.5.1 getting below error

Add-PSSnapin : The Windows PowerShell snap-in 'VMware.VimAutomation.Core' is not installed

on this computer.At C:\jenkins\workspace\promoted-hourly-ESX-bryce-VUM-scsi-esx_6\nodes\esx-

vum-65\esx\vum55\vum-import.ps1:5 char:1

+ Add-PSSnapin VMware.VimAutomation.Core

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (VMware.VimAutomation.Core:String) [Add-PSSn

   apin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinComm

   and

Add-PSSnapin : Cannot load Windows PowerShell snap-in VMware.VumAutomation because of the

following error: Could not load file or assembly 'file:///C:\Program Files

(x86)\VMware\Infrastructure\vSphere PowerCLI\VMware.VumAutomation.dll' or one of its

dependencies. The system cannot find the file specified. At C:\jenkins\workspace\promoted-hou

rly-ESX-bryce-VUM-scsi-esx_6\nodes\esx-vum-65\esx\vum55\vum-import.ps1:6 char:1

+ Add-PSSnapin VMware.VumAutomation

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidData: (VMware.VumAutomation:String) [Add-PSSnapin], PS

   SnapInException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinComm

   and

Reply
0 Kudos
LucD
Leadership
Leadership

From your earlier screenshot it looks like you installed PowerCLI 6.5R1, not 6.5.1.

And since 6.5R1 there are no PSSnapin anymore, it's modules only now.

You can do the following instead of the Add-PSSnapin cmdlet.

Get-Module -Name VMware* -ListAvailable | Import-Module


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
ankitj
Contributor
Contributor

Can you please let me know how i can achieve importing offline bundle into patch repository  with Vcenter 6.0 and vmware powercli

Reply
0 Kudos
LucD
Leadership
Leadership

As I said before, you can't with PowerCLI, only via the Web Clent afaik.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
olant
Contributor
Contributor

Any update here? Is it still not possiblt to upload offline ZIPs with PowerCLI? Maybe I am missing sth

Reply
0 Kudos