Hi Everyone!
There is one problem in my vSphere environment. I have 16 servers in cluster and one vm that can migrate. And I have a script, where Get-VMGuestNetworkInterface command is used. So, when vm is located on server1 Get-VMGuestNetworkInterface run normally and gets everything I need, but when that vm is located on server2 Get-VMGuestNetworkInterface returns an error:
Get-VMGuestNetworkInterface : 01.07.2015 12:42:22 Get-VMGuestNetworkInterface Unable to connect to the remote server
So, my question is: at what level that error occurs, because I don't understand who exactly can't connect to the server?
Ports are opend on both servers:
Security profiles are quite indentically:
working server:
not working server:
ESXi versions are identically:
working:
not working:
Any ideas?
Thanks.
I've found a reason! There was an incorrect ip address in /etc/vmware/vpxa/vpxa.cfg at the <hostIp>IP_ADDRESS</hostIp> section.
Few years ago we were migrating our infrastructure to the new IP range, so these are consequences. Despite this host have been working in cluster for years with no errors (except invoke-vmscript )
Is the name resolution for both ESXi nodes, forward and reverse, set up correctly for both ESXi nodes ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
On both servers I have identical settings in "Configuration -> DNS and Routing"
And I can correct nslookup them both forward and reverse.
I don't understand who can't connect to remote server (look at error message) while script is processing? vCenter or my working pc? As I understand remote server - is the Host server, where VM is situated, right? Nevertheless I ran that script on both vCenter and working pc - the same result.
The Get-VMGuestNetworkInterface cmdlet has the same prerequisites as the Invoke-VMScript cmdlet.
You could check if all conditions are present, see my Will Invoke-VMScript work
Can you try if it shows the same problem when you launch a simple command in the VM through the Invoke-VMScript cmdlet ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Invoke-Script returned the same error.
I have run that script already, it returned false only on this:
X86Engine : False
on both working and not working servers.
In the newer PowerCLI releases you can run the cmdlet from a 64-bit station (I'll have to update my script).
Are there any indications in the vmware.log file (you'll find it in the VM's folder) ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I've found a reason! There was an incorrect ip address in /etc/vmware/vpxa/vpxa.cfg at the <hostIp>IP_ADDRESS</hostIp> section.
Few years ago we were migrating our infrastructure to the new IP range, so these are consequences. Despite this host have been working in cluster for years with no errors (except invoke-vmscript )