vclient 中虚拟机vnc开启:
虚拟机的编辑设置: 选项-高级-常规-配置参数:
RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.port = "5901"
RemoteDisplay.vnc.password = "password"
RemoteDisplay.vnc.port = "5901"
RemoteDisplay.vnc.password = "password"
步骤:
1 首先vsphere client连接esxi,在目标虚拟机的配置参数加入一下内容
RemoteDisplay.vnc.enabled = true
RemoteDisplay.vnc.port = 5901 ‘自定义’
RemoteDisplay.vnc.password = 1238 ‘自定义’
2 进入esxi,编辑或新增 /etc/vmware/firewall/vnc.xml 文件,要包含以下内容:
<!-- Firewall configuration information for VNC -->
<ConfigRoot>
<service>
<id>VNC</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>5901</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>
3 刷新防火墙规则: ~ # esxcli network firewall refresh
验证规则生效: ~ # esxcli network firewall ruleset list | grep VNC
VNC true
然后就可以通过remote VNC 客户端连接此VM
(以上配置只能对单一VM生效,要同时连接多个VM,其他的vm需要配置不同的端口的以及打开
相应的防火墙端口)
1 首先vsphere client连接esxi,在目标虚拟机的配置参数加入一下内容
RemoteDisplay.vnc.enabled = true
RemoteDisplay.vnc.port = 5901 ‘自定义’
RemoteDisplay.vnc.password = 1238 ‘自定义’
2 进入esxi,编辑或新增 /etc/vmware/firewall/vnc.xml 文件,要包含以下内容:
<!-- Firewall configuration information for VNC -->
<ConfigRoot>
<service>
<id>VNC</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>5901</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>
3 刷新防火墙规则: ~ # esxcli network firewall refresh
验证规则生效: ~ # esxcli network firewall ruleset list | grep VNC
VNC true
然后就可以通过remote VNC 客户端连接此VM
(以上配置只能对单一VM生效,要同时连接多个VM,其他的vm需要配置不同的端口的以及打开
相应的防火墙端口)
转载于:https://blog.51cto.com/house/817326