一、开启ESXi主机上的shell和ssh功能
二、防火墙
1、ssh登录ESXi主机上
esxcli network firewall ruleset list 列出所有开启的端口
2、修改配置文件
[root@localhost:~] chmod 777 /etc/vmware/firewall/service.xml 添加权限 [root@localhost:~] chmod +t /etc/vmware/firewall/service.xml 添加属性 [root@localhost:~] vi /etc/vmware/firewall/service.xml 修改文件
3、自定义端口,添加如下红框里面的内容
4、刷新列表
[root@localhost:~] esxcli network firewall refresh
[root@localhost:~] esxcli network firewall ruleset list|grep vnc
web页面刷新一下
三、激活VNC
1、虚拟机关联VNC,登录对应的ESXi主机,编辑虚拟机,高级选项里面,编辑配置
2、添加参数
RemoteDisplay.vnc.enable true RemoteDisplay.vnc.port 666