Reply to Message

View discussion in a popup

Replying to:
KevinFoley
Contributor
Contributor

Old thread problem still exists

My target VM is Windows Server 2012R2 - thus PowerShell or BAT scripts

MKGuy wrote...

the host is being accessed by its IP in the HTTP host header instead of it's DNS name (with which the host is registered in vCenter and on which the SSL certificate is bound), meaning the client won't actually validate the SSL certificate presented as a browser would (and the SSL request is without SNI as well).

This explains why Invoke-VMScript does not work my NAT'd environments.

Scripts are being executed on the VM but the Invoke-VMScript returns an error

VERBOSE: 10/19/2017 11:04:38 AM Invoke-VMScript Started execution

VERBOSE: Performing the operation "Invoke-VMScript" on target "xyz"

VERBOSE: 10/19/2017 11:04:38 AM Invoke-VMScript Finished execution

FullyQualifiedErrorId : Client20_VmGuestServiceImpl_DownloadFileFromGuest_DownloadError

My development offices access our vCenter data center via VPN .

To prevent address conflicts between our office, traffic between our development offices and data centers is NAT'd

The native vCenter data center DNS is vcenter1.mydomain.com 10.11.100.7

The NAT'd development DNS entry is vcenter1.mydomain.com 10.15.100.7

The ESX hosts addresses follow the same pattern host1.mydomain.com 10.15.10.153 vs 10.11.10.153

So far, everything in PowerCLI works fine other than Invoke-VMScript.

Using RunAsync as a work around might be an option, but I need the results of the script output.

Can Invoke-VMScript be changed to reconnect to the host using the host DNS name instead of IP ?

Or is there a configuration option I missed to return host DNS vs host IP.

My environment :

Windows 10

VCenter 6.5

VMware ESXi, 6.5.0, 5969303

PowerCLI 6.5.3 as of yesterday ( also tried 6.5.1 and 2)

Reply
0 Kudos