因為目前我的 VMware ESX 4 需要換環境進而 IP 也需要改變一下, 但是這改變讓我無法連上虛擬機器.凡是虛擬機器的 console 都只會秀出
"Unable to connect to the MKS: Failed to connect to server 192.8.1.81:903"
上 VMware 的官方網站查詢得到的結果去是需要修改 DNS , Gateway 或是 Proxy .
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=749640
但是照著他的步驟還是無法生效,後來在 VMware 的官方網站上面談到如何透過 CLI (Command Line Interface)修改 Service Console 的 IP.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=4309499
結果是這個方式奏效.
如果你的 VMWare 是 ESX 版本可以透過 SSH 去連到 Service Console. 或是直接到 VMware ESX 用 Alt+F# 登入到系統,目前 ESXi4 預設並不支援 SSH 需要修改設定檔,請自行參考 VMware ESXi Server 的 Command Line https://benjr.tw/6457
官網的方式:
[root@server root]# esxcfg-vswif -i <a.b.c.d> -n <w.x.y.z> vswif0
- Run the following command to set the IP address:
-
where <a.b.c.d> is the IP address and <w.x.y.z> is the subnet mask.
Note: In this example, v swif0 is the Service Console adapter that is the interface to which you are applying the IP address change. - Open the /etc/hosts file with a text editor and modify it so that it reflects the correct IP address and hostname.
- To change the default gateway address and the hostname, edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values.
-
For the changes to take place, reboot the host or restart the network service with the command:
[root@server root]# service network restart
- Note: This command breaks any current network connections to the Service Console.
不過我的環境還是以 IP 和 DHCP 為主所以上面的指令會修改成.
[root@server root]# esxcfg-vswif -i DHCP vswif0 [root@server root]# esxcfg-vswif -l [root@server root]# service network restart
沒有解決問題,試試搜尋本站其他內容