如何在 vmware esxi 中開放 VNC功能及端口實現遠程管理 完整篇


VMWare esxi中開放 VNC功能及端口實現遠程管理 完整篇

在多個論壇上看了相關文章,總的寫得不完整。現將各方資源整編寫完整版。詳文如下!

 (圖片來自51CTO)

步驟1. 修改ESXi主機的firewall配置

在ESXi主機的/etc/vmware/firewall目錄下增加vnc的防火牆配置文件,vnc.xml,內容如下:

(忽略此行vi /etc/vmware/firewall/service.xml)

 

編輯/etc/vmware/firewall # cat  vnc.xml

<!-- FirewallRule for  VNC Console-->
<ConfigRoot>
<service>
 <id>VNC</id>
  <rule id = '0000'>
  <direction>inbound</direction>
  <protocol>tcp</protocol>
  <porttype>dst</porttype>
   <port>
 <begin>5900</begin>
   <end>5910</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>

 

步驟2. 刷新防火牆規則

/etc/vmware/firewall# esxcli networkfirewall refresh

檢查規則是否生效:

/etc/vmware/firewall# esxcli networkfirewall ruleset list | grep VNC

VNC                   true 說明 看到提示VNC ,狀態true即開啟

/etc/vmware/firewall#

步驟3. Vsphere Client 虛擬機配置

步驟如下:

關閉虛擬機,然后對虛擬機“編輯設置”。

鼠標右擊選擇 “Edit settings”;

配置選擇 “Options” 標簽頁;

選項在 “Advanced” 下選擇 “General”;

高級下面的常規點擊 “Configuration Parameters” 按鈕;

編輯配置參數最后加入如下配置參數:

RemoteDisplay.vnc.enabled= true

RemoteDisplay.vnc.password=<password>

RemoteDisplay.vnc.port= <port>

設置完成以后,重新啟動虛擬機。

步驟4. 客戶端測試

通過VNC-Viewer連接剛才的虛擬機控制台

wKiom1nZ3kOhrT6TAACifgsTo8s926.jpg

 

 

VNC Server里面輸入的是ESXi的IP地址,端口號為RemoteDisplay.vnc.port=<port>所配置的端口號。

wKiom1nZ3pSQqH5DAADDCswe0wQ734.jpg

 

這里的密碼為:RemoteDisplay.vnc.password = <password>所配置的密碼。

 

wKioL1nZ3mGjuxQ1AAMx8lSuhdY181.jpg


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM