VMware Cloud Community
esstokes1
Enthusiast
Enthusiast

the underlying connection was closed error

We recently upgraded to PowerCLI 5.1 Release 2 and we are now starting to see "the underlying connection was closed: an unexpected error occurred on a receive" when running running our virtual machine creation scripts (this worked without issues using PowerCLI 4.1 U1).  The script uses a for-loop to create a virtual machine, get its mac address, and update dhcp;  then goes on to the next virtual machine that needs to be created.  The error occurs when trying to get the mac address but the script will continue creating virtual machines as it processes the for-loop so it appears the connection is actually fine – there was just an error on returning the mac address.  Is there a way to verify the connection was really closed?  I'm thinking this is just a general error and the issue is the data that was returned.  Also, we are using the PowerCLI install to automate old and new environments (old being 4.1) so I'm also wondering if anyone else has seen issues related to PowerCLI 5.1 running against VirtualCenter 4.1.  I saw where the Move-VM cmdlet throws a number of warnings because the properties on the VirtualMachine object is different between 4.1 and 5.1 so I'm wondering if something similar could be the issue.  Any insight would be greatly appreciated.

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Did you already check the vpxd logs on the vCenter for any clues ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos