VMware Cloud Community
sbrown218
Enthusiast
Enthusiast

powercli unable to connect to vcsa 6.5 , ubuntu

Just downloaded Ubuntu Server 18.04.1 which has the option to install Powershell (via snap).  When I try to connect to an ESXi host directly there are no problems.  Connecting to VCSA 6.5 throws the following error --

PS /root> Connect-VIServer 192.168.10.10

Specify Credential

Please specify server credential

User: username

Password for user username: *****************

Connect-VIServer : Value cannot be null.

Parameter name: source

At line:1 char:1

+ Connect-VIServer 192.168.10.10

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

+ CategoryInfo          : NotSpecified: (:) [Connect-VIServer], ArgumentNullException

+ FullyQualifiedErrorId : System.ArgumentNullException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

PS /root> $psversiontable

Name                           Value

----                           -----

PSVersion                      6.1.0

PSEdition                      Core

GitCommitId                    6.1.0

OS                             Linux 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018

Platform                       Unix

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

PSRemotingProtocolVersion      2.3

SerializationVersion           1.1.0.1

WSManStackVersion              3.0

PS /root> Get-PowerCLIVersion

PowerCLI Version

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

   VMware PowerCLI 10.1.0 build 8346946

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

Component Versions

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

   VMware Cis Core PowerCLI Component PowerCLI Component 10.1 build 8377811

   VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 10.1 build 8344055

0 Kudos
5 Replies
LucD
Leadership
Leadership

Don't know how you installed PowerShell and PowerCLI on UBuntu, but there are a few documented procedures.

See Install Powershell And PowerCLI In Ubuntu 18.04  and How to Install PowerCLI on Ubuntu Linux 18.04 LTS

Note that they stayed with the PowerShell version mentioned in the PowerCLI 10.2.0 Compatibility Matrix?

Can you try with PS v6.0.2?


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

0 Kudos
sbrown218
Enthusiast
Enthusiast

deleted the vm i had and rebuilt using the method you suggested.  still have the same issue.  perhaps an issue with ubuntu 18.04.1.  i will try with 18.04 and see if there are any differences.

Connect-VIServer : Value cannot be null.

Parameter name: source

At line:1 char:1

+ Connect-VIServer 192.168.10.10

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

+ CategoryInfo          : NotSpecified: (:) [Connect-VIServer], ArgumentNullException

+ FullyQualifiedErrorId : System.ArgumentNullException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

install method used --

# sudo/root

apt-get update

apt-get upgrade

reboot

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add

curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/18.04/prod.list

#liblttng-ust0 missing from ubuntu 18.04.1, must add universe repo to get powershell installed

add-apt-repository universe

apt-get update

apt-get install powershell-preview

#launch powershell

pwsh-preview

#install powercli + set ceip/cert options

Install-Module -Name VMware.PowerCLI

Set-PowerCLIConfiguration -ParticipateInCeip $false -Scope AllUsers -Confirm:$false

Set-PowerCLIConfiguration -InvalidCertificateAction ignore -Scope AllUsers -confirm:$false

0 Kudos
sbrown218
Enthusiast
Enthusiast

Perhaps easier said than done, i cant find Ubuntu 18.04 LTS anywhere, just 18.04.1 LTS

0 Kudos
LucD
Leadership
Leadership

I suspect the issue might sooner come from the PS version.

PS v6.1 comes with a new .Net Core


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

0 Kudos
t0ta11ed74
Contributor
Contributor

I know this one is old but a year later and a newer version and I have this exact same issue, only from a Windows 2012 R2 box. Out of 5 different vCenters, it can't connect to one of them, and it returns the same error. I'm on PowerCLI 11.3 and Powershell 5.1. I currently have a ticket open with support, but it's been slow.

0 Kudos