govmomi: vcsim: unable to connect when using PowerCLI 10 GA

vcsim version: https://github.com/vmware/govmomi/commit/8872366d5b156a8cbef4b7291cd6e9026b8129a5 PowerCLI version: 10.0.0.7895300 GA PowerShell version v6.0.1 GA

Running following sequence:

docker run --rm -it --net=host  vmware/dispatch-powershell-base:0.0.2
Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false
Connect-VIServer -Server 127.0.0.1 -Port 8989 -User user -Password pass

Gives:

Connect-VIServer : An error occurred while sending the request.
At line:1 char:1
+ Connect-VIServer -Server 127.0.0.1 -Port 8989 -User user -Password pa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Connect-VIServer], CommunicationException
+ FullyQualifiedErrorId : System.ServiceModel.CommunicationException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

Here is the trace from vcsim:

$ vcsim -trace
export GOVC_URL=https://user:pass@127.0.0.1:8989/sdk GOVC_SIM_PID=4515
Request: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><RetrieveServiceContent xmlns="urn:vim25"><_this type="ServiceInstance">ServiceInstance</_this></RetrieveServiceContent></s:Body></s:Envelope>
Response: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><RetrieveServiceContentResponse xmlns="urn:vim25"><returnval><rootFolder type="Folder">group-d1</rootFolder><propertyCollector type="PropertyCollector">propertyCollector</propertyCollector><viewManager type="ViewManager">ViewManager</viewManager><about><name>VMware vCenter Server (govmomi simulator)</name><fullName>VMware vCenter Server 6.5.0 build-5973321</fullName><vendor>VMware, Inc.</vendor><version>6.5.0</version><build>5973321</build><localeVersion>INTL</localeVersion><localeBuild>000</localeBuild><osType>linux-amd64</osType><productLineId>vpx</productLineId><apiType>VirtualCenter</apiType><apiVersion>6.5</apiVersion><instanceUuid>dbed6e0c-bd88-4ef6-b594-21283e1c677f</instanceUuid><licenseProductName>VMware VirtualCenter Server</licenseProductName><licenseProductVersion>6.0</licenseProductVersion></about><setting type="OptionManager">VpxSettings</setting><userDirectory type="UserDirectory">UserDirectory</userDirectory><sessionManager type="SessionManager">SessionManager</sessionManager><authorizationManager type="AuthorizationManager">AuthorizationManager</authorizationManager><serviceManager type="ServiceManager">ServiceMgr</serviceManager><perfManager type="PerformanceManager">PerfMgr</perfManager><scheduledTaskManager type="ScheduledTaskManager">ScheduledTaskManager</scheduledTaskManager><alarmManager type="AlarmManager">AlarmManager</alarmManager><eventManager type="EventManager">EventManager</eventManager><taskManager type="TaskManager">TaskManager</taskManager><extensionManager type="ExtensionManager">ExtensionManager</extensionManager><customizationSpecManager type="CustomizationSpecManager">CustomizationSpecManager</customizationSpecManager><customFieldsManager type="CustomFieldsManager">CustomFieldsManager</customFieldsManager><diagnosticManager type="DiagnosticManager">DiagMgr</diagnosticManager><licenseManager type="LicenseManager">LicenseManager</licenseManager><searchIndex type="SearchIndex">SearchIndex</searchIndex><fileManager type="FileManager">FileManager</fileManager><datastoreNamespaceManager type="DatastoreNamespaceManager">DatastoreNamespaceManager</datastoreNamespaceManager><virtualDiskManager type="VirtualDiskManager">virtualDiskManager</virtualDiskManager><snmpSystem type="HostSnmpSystem">SnmpSystem</snmpSystem><vmProvisioningChecker type="VirtualMachineProvisioningChecker">ProvChecker</vmProvisioningChecker><vmCompatibilityChecker type="VirtualMachineCompatibilityChecker">CompatChecker</vmCompatibilityChecker><ovfManager type="OvfManager">OvfManager</ovfManager><ipPoolManager type="IpPoolManager">IpPoolManager</ipPoolManager><dvSwitchManager type="DistributedVirtualSwitchManager">DVSManager</dvSwitchManager><hostProfileManager type="HostProfileManager">HostProfileManager</hostProfileManager><clusterProfileManager type="ClusterProfileManager">ClusterProfileManager</clusterProfileManager><complianceManager type="ProfileComplianceManager">MoComplianceManager</complianceManager><localizationManager type="LocalizationManager">LocalizationManager</localizationManager><storageResourceManager type="StorageResourceManager">StorageResourceManager</storageResourceManager><guestOperationsManager type="GuestOperationsManager">guestOperationsManager</guestOperationsManager><overheadMemoryManager type="OverheadMemoryManager">OverheadMemoryManager</overheadMemoryManager><certificateManager type="CertificateManager">certificateManager</certificateManager><ioFilterManager type="IoFilterManager">IoFilterManager</ioFilterManager><vStorageObjectManager type="VcenterVStorageObjectManager">VStorageObjectManager</vStorageObjectManager><hostSpecManager type="HostSpecificationManager">HostSpecificationManager</hostSpecManager><cryptoManager type="CryptoManagerKmip">CryptoManager</cryptoManager><healthUpdateManager type="HealthUpdateManager">HealthUpdateManager</healthUpdateManager><failoverClusterConfigurator type="FailoverClusterConfigurator">FailoverClusterConfigurator</failoverClusterConfigurator><failoverClusterManager type="FailoverClusterManager">FailoverClusterManager</failoverClusterManager></returnval></RetrieveServiceContentResponse></soapenv:Body></soapenv:Envelope>
Request: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Login xmlns="urn:vim25"><_this type="SessionManager">SessionManager</_this><userName>user</userName><password>pass</password></Login></s:Body></s:Envelope>
Response: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><LoginResponse xmlns="urn:vim25"><returnval><key>9623b9a1-1dc6-410c-986e-016f917820d7</key><userName>user</userName><fullName>user</fullName><loginTime>2018-03-12T16:06:22.619383428-07:00</loginTime><lastActiveTime>2018-03-12T16:06:22.619383823-07:00</lastActiveTime><locale>en_US</locale><messageLocale>en_US</messageLocale></returnval></LoginResponse></soapenv:Body></soapenv:Envelope>
Request: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><QueryOptions xmlns="urn:vim25"><_this type="OptionManager">VpxSettings</_this><name>config.vpxd.sso.sts.uri</name></QueryOptions></s:Body></s:Envelope>
Response: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><QueryOptionsResponse xmlns="urn:vim25"><returnval xmlns:XMLSchema-instance="http://www.w3.org/2001/XMLSchema-instance" XMLSchema-instance:type="OptionValue"><key>config.vpxd.sso.sts.uri</key><value XMLSchema-instance:type="xsd:string">https://127.0.0.1/sts/STSService/vsphere.local</value></returnval></QueryOptionsResponse></soapenv:Body></soapenv:Envelope>

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks, we would look into it. Currently there is no way to specify a custom port for LS. In general there is the issue that vCenter does not report in a clean way where the LS is.

I don’t think it should be failing to connect if the Lookup Service is not there. If the Lookup Service is missing some functionality would not work (e.g. tags) if you try to use those.

Can you extract a stack trace from the error:

    $lastError = $Error[0]
    $lastError
    $lastError.Exception
    $lastError.Exception.StackTrace
    $lastError.Exception.InnerException
    $lastError.Exception.InnerException.StackTrace
    $lastError.Exception.InnerException.InnerException
    $lastError.Exception.InnerException.InnerException.StackTrace