今天為了加記憶體,把VM的主機給停了,記憶體加完後開機,在加載系統時在Mount VSD時卻出現錯誤,錯誤訊息如下:
vsd-mount 【!!】
VSD Mount/Bin/SH:can’t access TTY job control turned off
在查詢了故障的訊息後,發現是因為VM主機上的esxconsole.vmdk 遺失的關係。
這個問題似乎很常見,在網路上可以找到不少貼文。
於是在查詢了官方的KB後,大概了解了處理的方式。
-
Go to the console of the ESX host. After the error message, ESX drops into Troubleshooting (busy box) mode. (先進入Troubleshooting 模式)
-
Find the .vmdk for the service console by running the command: (找到esxconsole.vmdk的存放路徑)
# grep "/boot/cosvmdk" /etc/vmware/esx.conf
The output is similar to:
/boot/cosvmdk = "/vmfs/volumes/<uuid>/<dir>/esxconsole.vmdk"
For example:
/boot/cosvmdk = "/vmfs/volumes/4a14d968-88bf7161-700f-00145ef48f76/esxconsole-4a14d906-2f96-7956-7284-00145ef48f74/esxconsole.vmdk" -
Make note of the <uuid> and the <dir> values in the output. (把uuid及以dir抄錄下來,即第二點反紅的部份)
-
Verify that the files exist by running the command: (確認路徑下VMDK的狀態)
# ls -al /vmfs/volumes/<uuid>/<dir>/*.vmdk
Where <uuid> and <path> is from the output of step 2.
The output is similar to:
total 7906560
drwxr-xr-x 1 root root 840 May 21 00:45 .
drwxr-xr-t 1 root root 2660 Oct 21 09:10 ..
-rw------- 1 root root 8095006720 Oct 26 15:37 esxconsole-flat.vmdk
-rw------- 1 root root 475 May 21 00:32 esxconsole.vmdk
drwxr-xr-x 1 root root 980 May 21 00:45 logs -
接下來這邊會有三個可能發生的狀況,請視自己遇到的狀況進行排除: (我選擇了第二項,重建VMDK)
狀況一:
Note: You may receive the error: ls: /vmfs/volumes/4a14d968-88bf7161-700f-00145ef48f76/esxconsole-4a14d906-2f96-7956-7284-045ef48f74/: No such file or directory. If the directory does not exist, see ESX fails to boot when the disk containing the datastore with esxconsole.vmdk is detected as a snapshot (1012142).
狀況二:
If the esxconsole.vmdk file does not exist, see Recreating a missing virtual disk (VMDK) header/descriptor file (1002511) and ensure that the following settings are in place:
基本上的步驟大致如下:
1.# cd /vmfs/volumes/myvmfsvolume/mydir (進到vmdk存放的位置)
2.# ls -l vmdisk0-flat.vmdk (確認 vmdisk0-flat.vmdk 檔案大小)
-rw------- 1 root root 4294967296 Oct 11 12:30 vmdisk0-flat.vmdk
3.# vmkfstools -c 4294967296 -a lsilogic -d thin temp.vmdk (創建一個跟falt一樣大小的temp.vmdk,此時會另外產生一個temp-flat.vmdk)
4.# rm temp-flat.vmdk (移除temp-flat.vmdk)
5.# mv temp.vmdk vmdisk0.vmdk (把temp.vmdk 改名為 vmdisk0.vmdk)
6.# vi vmdisk0.vmdk (用vi打開vmdisk0.vmdk)
找到RW 8388608 VMFS "temp-flat.vmdk" 並修改為 RW 8388608 VMFS "vmdisk0-flat.vmdk"。
並在#ddb 下加入一行ddb.thinProvisioned = "1"。
輸入:wq存檔
基本上重依序重建後即可成功開機進入系統,不過我卻發現,重建後的系統一直無法加入Cluster。
出現的問題如下:
cmd addnode failed for primary node: Internal AAM Error - agent could not start
在嘗試進行修改hosts及以conf後,以及官網上的# tcpdump -i vswif0 -s 900 -n udp port 8043 -w ${HOSTNAME}.pcap
後,依然無法解決。後來在嘗試新建一個cluster,並將故障主機加入後後,HA的設定卻又很正常。放是最後只好刪除現有的cluster並重建。
問題即告解決。
狀況三:
Note: If the esxconsole-flat file does not exist, you must reinstall the ESX host to recreate the service console.
留言列表