ESXI 5.0配置VNC访问

记录下今天工作中遇到的问题,默认安装ESXI 5.0后,想通过VNC访问上面的虚拟机,

需要自己添加防火墙的rule。

在/etc/vmware/firewall/下添加一个vnc.xml


<!-- Firewall Rule for Abiquo VNC Console -->
<ConfigRoot>
 <service>
  <id>VNC</id>
  <rule id = '0000'>
    <direction>inbound</direction>
    <protocol>tcp</protocol>
    <porttype>dst</porttype>
    <port>
      <begin>5900</begin>
      <end>5964</end>
    </port>
  </rule>
  <rule id = '0001'>
   <direction>outbound</direction>
   <protocol>tcp</protocol>
   <porttype>dst</porttype>
   <port>
     <begin>0</begin>
     <end>65535</end>
    </port>
  </rule>
  <enabled>true</enabled>
  <required>false</required>
  </service>
</ConfigRoot>

然后回到主目录执行:


~ # esxcli network firewall refresh
~ # esxcli network firewall ruleset list | grep VNC
 

VNC                   true


这时候就可以访问虚拟机了。

其中我开启了5900-5964的端口,因为创建的虚拟机的远程访问默认是从5900开始递增的。

你可能感兴趣的:(ESXI 5.0配置VNC访问)