Got a "Bad Gateway"?

Greetings, folks!


Hope you had a great Easter on last Sunday, if you celebrate that holiday! My kids certainly enjoyed hunting eggs in a typical Seattle drizzling Saturday morning. J


This blog entry is for folks who use or plan to use VMM to manage VMware ESX hosts.


If this is your first time adding your ESX host to VMM, and your ESX hosts are added into VMM by using DNS name (instead of IP address), and your network environment with Internet proxy is not made aware of VMware host DNS names, you may see error similar to below:

Error (2891)

VMM cannot complete the ….  action on the server because of the error: The remote server returned an error: (502) Bad Gateway.

 (Unknown error (0x194)) 


This issue may occur when:

·         To turn your ESX host from “OK(Limited)” state to “OK” state (to get your ESX host in full management mode), you are providing root user credentials and attempting to retrieve the certificate and SSH key from the ESX host to approve.

·         You may also run into the same error when attempting to perform a live migration (VMotion) for a VM hosted by an ESX host from VMM admin console.


The cause of this issue is due to the DNS resolution (or proxy configuration) on your VMM server:

·         VMM uses web services to communicate to VMware Virtual Center and ESX hosts. 

·         Proxies are generally configured to permit pass-through of local DNS names. 

·         In some cases, when the proxy is not configured for a DNS name, the web service connection may fail.


Following are some simple options to resolve this issue:

·         SOLUTION 1: Include VMWare host DNS names in the internet proxy configuration.

·         SOLUTION 2: Add dns hosts to the proxy configuration of Internet Explorer

·         SOLUTION 3: Create a file “vmmservice.exe.config” in the same location as vmmservice.exe (by default, it’s installed under this directory: %ProgramFiles%\Program Files\Microsoft System Center Virtual Machine Manager 2008\bin\) with contents similar to the following. Note: you will need to bounce the VMM server service (restart “Virtual Machine Manager” service from services.mcs) for it to pick up the new proxy configuration).





        <add address=”[a-z]+\.contoso\.com” />






On the extreme side, you could also completely turn off the proxy on your VMM server by applying the following config file:



    <defaultProxy enabled=”false”>






Hope this helps and thanks for reading!




Comments (0)