Hi Jon, I need to use this method since i need to work with multiple VMware products like vCenter, vCloud Director, VCNS etc. I believe there are no modules yet for vCloud Director and VCNS. Kindly suggest if there are alternatives.
For my issue here is what i did. The powercli version on the host that was running fine was 6.0 Release 1. In the new host i remove the latest powercli which is 6.5 Release 1 and installed 6.0 Release 1. It started working. I checked that 6.0 has both snapin's as well as modules. In 6.5 we only have modules (VMware migrated from snapins to modules) I'm not sure but probably Ansible needs snapin's in order to work. Any suggestions or thoughts? Regards, Rajesh On Wednesday, December 7, 2016 at 3:02:52 AM UTC+5:30, J Hawkesworth wrote: > > Hi Rajesh, > > I have seen System.OutOfMemoryException thrown on Windows Server 2008 R2 > which has not yet had windows updates applied. > I don't know PowerCli so i don't know if it requires large memory > allocation (winrm sets quotas on memory, cpu etc - see > https://msdn.microsoft.com/en-us/library/ee309367(v=vs.85).aspx - so it > is possible you might need to increase one or more quota settings. > > Also it might be worth trying vmware_guest module and connecting from your > ansible controller to vSphere directly, rather than going via a windows > host. > > Hope this helps, > > Jon > > On Tuesday, December 6, 2016 at 11:13:20 AM UTC, Rajesh N wrote: >> >> Folks, >> I have an Ansible server and a Windows PowerShell server with >> PowerCli. >> I encapsulate PowerCli commands within PowerShell scripts and call them >> in Ansible. >> >> It works on one Windows server and doesn't on another. >> Getting error as below >> "Connect-VIServer Exception \r\nof type >> 'System.OutOfMemoryException' was thrown. >> NotSpecified: (:) [Connect-VIServer], ViError\r\n+ FullyQualifiedErrorId >> : Client20_ConnectivityServiceImpl_Reconnect_Excep >> \r\ntion,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer\r\n\r\nGet-Datacenter >> >> : Get-Datacenter >> You are not \r\ncurrently connected to any servers. Please connect first >> using a Connect \r\ncmdlet" >> >> Is there any requirements that I need to follow? >> I'm able to run normal powershell scripts via ansible on both windows >> servers and am able to run powercli commands within the windows servers. >> >> Kindly suggest. >> >> Regards, >> Rajesh >> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/14a72268-37a0-4e53-bf26-3e0105ab304f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.