@@ -339,19 +339,66 @@ port group so that CloudStack can find it:
339339Extend Port Range for CloudStack Console Proxy
340340^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
341341
342- (Applies only to VMware vSphere version 4.x)
343-
344- You need to extend the range of firewall ports that the console proxy
345- works with on the hosts. This is to enable the console proxy to work
346- with VMware-based VMs. The default additional port range is 59000-60000.
347- To extend the port range, log in to the VMware ESX service console on
348- each host and run the following commands:
342+ In production environments (large number of VMs),
343+ it's needed to extend the range of firewall ports that the console proxy
344+ works with on the hosts. The default additional port range is 50000-50999
345+ (see global settings ``vmware.additional.vnc.portrange.size `` and ``vmware.additional.vnc.portrange.start ``).
346+
347+ Change global setting ``vmware.additional.vnc.portrange.size `` to i.e "10000" and restart the
348+ management-server service on each management server.
349+ Add those additional ports to the ESXi firewall on each host.
350+ Log in via SSH to every VMware ESXi host and edit the file ``/etc/rc.local.d/local.sh ``
351+ by adding the following lines just above the "exit 0" line.:
349352
350353.. parsed-literal ::
351354
352- esxcfg-firewall -o 59000-60000,tcp,in,vncextras
353- esxcfg-firewall -o 59000-60000,tcp,out,vncextras
355+ cat <<EOF > /etc/vmware/firewall/vncAdditionalPorts.xml
356+ <ConfigRoot>
357+ <service>
358+ <id>vncAdditionalPorts</id>
359+ <rule id='0000'>
360+ <direction>inbound</direction>
361+ <protocol>tcp</protocol>
362+ <porttype>dst</porttype>
363+ <port>
364+ <begin>51000</begin>
365+ <end>60000</end>
366+ </port>
367+ </rule>
368+ <enabled>true</enabled>
369+ <required>false</required>
370+ </service>
371+ </ConfigRoot>
372+ EOF
373+ esxcli network firewall refresh
374+
375+ This will ensure the needed firewall rules are applied on boot of ESXi hosts.
376+
377+ To make the change on the running host, repeat the commands that were just added to ``local.sh `` script, at the shell command line:
378+
379+ .. parsed-literal ::
354380
381+ cat <<EOF > /etc/vmware/firewall/vncAdditionalPorts.xml
382+ <ConfigRoot>
383+ <service>
384+ <id>vncAdditionalPorts</id>
385+ <rule id='0000'>
386+ <direction>inbound</direction>
387+ <protocol>tcp</protocol>
388+ <porttype>dst</porttype>
389+ <port>
390+ <begin>51000</begin>
391+ <end>60000</end>
392+ </port>
393+ </rule>
394+ <enabled>true</enabled>
395+ <required>false</required>
396+ </service>
397+ </ConfigRoot>
398+ EOF
399+ esxcli network firewall refresh
400+
401+ Run the script ``/sbin/auto-backup.sh `` and then logout from each ESXi host.
355402
356403Configure NIC Bonding for vSphere
357404^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments