This has probably been addressed before, but I cannot seem to find an answer.
I am trying to deploy VM's to a VCENTER Cluster, with PowerCLI using Shawn Masterson's script. I am having trouble getting the script to connect to the the VCENTER. At least that is what I think is the problem. I have used the following to troubleshoot the issue.
I am trying to set this script to install multiple VM’s from the command line, and I am having the following issue.
Enter vCenter server FQDN or IP: vcenter.vsphere.local
Connecting to vCenter - vcenter.vsphere.local
Unable to connect to vcenter.vsphere.local
What I have tried to troubleshoot the problem:
I have tried to connect directly to the vcenter using connect-viserver from the Powershell window.
PS C:\Deploy> Connect-VIServer vcenter.vsphere.local
Name Port User
---- ---- ----
PS C:\Deploy>
I tried using the IP address of the VCenter server
PS C:\Deploy> Connect-VIServer 10.0.0.100
Name Port User
---- ---- ----
PS C:\Deploy>
My PowerCLI is good.
PS C:\Deploy> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware PowerCLI 10.0.0 build 7895300
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component PowerCLI Component 10.0 build 7893915
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 10.0 build 7893909
PowerCLI Version
----------------
VMware PowerCLI 10.0.0 build 7895300
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component PowerCLI Component 10.0 build 7893915
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 10.0 build 7893909
I think my Powershell is good. I can ping both front ways and backwards.
PS C:\Deploy> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 16299 251
PS C:\Deploy> ping vcenter.vsphere.local
Pinging vcenter.vsphere.local [10.0.0.100] with 32 bytes of data:
Reply from 10.0.0.100: bytes=32 time=1ms TTL=64
Reply from 10.0.0.100: bytes=32 time=1ms TTL=64
Reply from 10.0.0.100: bytes=32 time=3ms TTL=64
Reply from 10.0.0.100: bytes=32 time=2ms TTL=64
Ping statistics for 10.0.0.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 3ms, Average = 1ms
PS C:\Deploy>
PS C:\Deploy> ping 10.0.0.100
Pinging 10.0.0.100 with 32 bytes of data:
Reply from 10.0.0.100: bytes=32 time=1ms TTL=64
Reply from 10.0.0.100: bytes=32 time=1ms TTL=64
Reply from 10.0.0.100: bytes=32 time=2ms TTL=64
Reply from 10.0.0.100: bytes=32 time=2ms TTL=64
Ping statistics for 10.0.0.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
PS C:\Deploy>
It appears the cmdlet is able to connect to the server, and I am able to talk by both name and number, and I can verify that the username/password are correct.
It just does not look like it is even trying to connect to the VCenter. It just goes boom, and then boom it fails.
I apologize if this has been addressed in prior posts, I would appreciate any help that could be provided.
EllisDee
And where can we find that script you are referring to?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok, I think you referring to this: Deploying multiple VMs via PowerCLI – Updated v1.2
The Connect-VIServer in that script doesn't show any output (is it redirect to $null).
So your run of the script must be failing somewhere else.
How do you run the script?
And what is the output your see on screen?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
We hit this issue and it was due to a self-signed certificate. To fix this we simply added this line before attempting to connect, hope it helps!
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false