VMware Cloud Community
blinkev
Contributor
Contributor
Jump to solution

Get-VMGuestNetworkInterface error

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:

nmap.jpg

Security profiles are quite indentically:

working server:

working.jpg

not working server:

not working.jpg

ESXi versions are identically:

working:

working 2.jpg

not working:

not working 2.jpg

Any ideas?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
blinkev
Contributor
Contributor
Jump to solution

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 Smiley Happy)

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
blinkev
Contributor
Contributor
Jump to solution

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.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
blinkev
Contributor
Contributor
Jump to solution

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.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
blinkev
Contributor
Contributor
Jump to solution

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 Smiley Happy)

0 Kudos