VMware Cloud Community
hudsonmw
Contributor
Contributor

changing http/https ports in ESXi 5.0

I tried to add the following to the proxy.xml on my ESXi 5.0 server, but it seems that it won't work.  Once I upload it back to the server, I cannot connect to it through vSphere.  I do specifiy ip_addres:port in vSphere.

<ConfigRoot>

     <httpPort>8081</httpPort>

     <httpsPort>8082</httpsPort>

0 Kudos
2 Replies
hudsonmw
Contributor
Contributor

I discovered the fix with the assistance of VMware partner support.  Below are the steps I took.  Please note until this workaround will not persist through a reboot until the file allows editing. For the example below I am using 8081 for httpPort and 8082 for httpsPort.

1.  edit proxy.xml to include my custom ports per KB 1021199

2.  get service.xml from the host using pscp.exe and save it locally.

pscp root@HostIP/etc/vmware/firewall/service.xml d:\service.xml

3. edit service.xml, replacing the vSphere client ports as follows:

<service id='0017'>

     <id>vSphereClient</id>

     <rule id='0000'>

          <direction>inbound</direction>

          <protocol>tcp</protocol>

          <porttype>dst</porttype>

          <port>8081</port>

     </rule>

     <rule id='0001'>

          <direction>inbound</direction>

          <protocol>tcp</protocol>

          <porttype>dst</porttype>

          <port>8082</port>

     </rule>

     <enabled>true</enabled>

     <required>true</required>

<service>

4.  SSH into the host, delete the service.xml file and pscp the edited service.xml back.

#rm service.xml

pscp d:\service.xml root@HostIP/etc/vmware/firewall/service.xml

5.  #esxcli network firewall unload

6.  #esxcli network firewall load

7. Restart management agents

8. Connect to host via vSphere client using IP:8082

0 Kudos
stevenfoo
Contributor
Contributor

Sorry, I don't mean to hijack this reply, however I follow the steps, the port 8081 does appear after reload the firewall and restarting mgmt service.

However there is an error while connecting via <IP ADDR>:8081 via the vsphere client

"Call "ServiceInstance.RetrieveContent" for object "ServiceInstance" on Server failed." .. any ideas?

Proxy.xml

<ConfigRoot>

<httpPort>8081</httpPort>

  <EndpointList>

...

..

Services.xml

<service id='0017'>

    <id>vSphereClient</id>

    <rule id='0000'>

      <direction>inbound</direction>

      <protocol>tcp</protocol>

      <porttype>dst</porttype>

      <port>902</port>

    </rule>

    <rule id='0001'>

       <direction>inbound</direction>

       <protocol>tcp</protocol>

       <porttype>dst</porttype>

       <port>443</port>

    </rule>

    <rule id='0002'>

       <direction>inbound</direction>

       <protocol>tcp</protocol>

       <porttype>dst</porttype>

       <port>8081</port>

    </rule>

    <enabled>true</enabled>

    <required>false</required>

VpxClient.exe.config

<add key = "protocolports" value = "https:443;http:8081"/>

0 Kudos