狀況說明:
昨日發現一台esx 4.0主機其中一顆硬碟故障(做RAID 1),利用clone vm方式也無法將vm備份出來。
解決方法:
1.利用再生龍,將整顆硬碟備份成映像檔,然後測試異機還原,出現錯誤訊息如下:* vsd-mount .................................................... [Failed]
You have entered the recovery shell. The situation you are in may be recoverable.
If you are able to fix this situation the boot process will continue normally after you exit this terminal.
/Bin/SH: cant access TTY job control turned off
2.進行以下設定:
=========================================================================================================
If the ESX host has detected the VMFS volume containing the esxconsole.vmdk
file as a snapshot LUN, the ESX host drops into Troubleshooting (busy box) mode during boot.
Note: Depending on the installation type (for example, interactive mode or scripted mode), the service console files may be named differently. To verify the name of the service console file (esxconsole.vmdk
, default-cos.vmdk
, etc), run this command on the ESX command line:# grep -i cosvmdk /etc/vmware/esx.conf
This procedure uses esxconsole.vmdk
. Replace with the name of your service console file as necessary.
To allow your ESX host to boot successfully:
- Provide the necessary credentials to access the busy box.
- Run this command to enable automatic resignaturing of datastores on the host:
# esxcfg-advcfg -s 1 /LVM/EnableResignature
You must get output similar to:Value of EnableResignature is 1 .
Note: If the root is mounted as read-only, run themount -o remount /
command to remount the volumes so that they are in a writable state. - Run this command to unload the VMFS drivers:
# vmkload_mod -u vmfs3
- Run this command to load the VMFS drivers:
# vmkload_mod vmfs3
- Run this command to detect new VMFS volumes and resignature the volume:
# vmkfstools -V
- Disable resignaturing on the host again (change its value back to
0
):# esxcfg-advcfg -s 0 /LVM/EnableResignature
- Run this command to identify the full path of the service console file:
# find /vmfs/volumes/ -name esxconsole.vmdk
The output appears similar to:/vmfs/volumes/4a14d968-88bf7161-700f-00145ef48f76/esxconsole-4a14d906-2f96-7956-7284-00145ef48f74/esxconsole.vmdk
Notes:
- The
esxconsole.vmdk
descriptor file is missing if no output is returned. To recreate theesxconsole.vmdk
descriptor file, see Recreating a missing virtual machine disk (VMDK) descriptor file (1002511) and follow the steps to recreate the descriptor file, then continue with the steps above. - Make a note of this full path. After noting down the path information, you may skip step 7 and proceed with rebooting the ESX host.
- The
- Restart the VMware ESX machine. You see a menu provided by the grub boot loader.
- Press
e
to edit the grub entries manually. - Scroll down to the line that starts with
kernel /vmlinuz
(it is indented under the VMware ESX 4.0 heading). - Press
e
(Edit key), go to the end of the line, and add a space followed by the option, all in one line, specifying the full path from step 7:/boot/cosvmdk= /vmfs/volumes/path/esxconsole.vmdk
- Press Enter to accept the changes.
- Press
b
to boot using the modified settings. The ESX host successfully boots.
Note: The changes made to the boot options are not saved. They only apply to the current boot process. The changes need to be made to the boot configuration files as described in these steps:- Log into the console as root.
- Edit the
/etc/vmware/esx.conf
file with a text editor and modify two lines, specifying the full path from step 7:/adv/Misc/CosCorefile = "/vmfs/volumes/path/core-dumps/cos-core"
/boot/cosvmdk = "/vmfs/volumes/path/esxconsole.vmdk" - Run this command to update the boot configuration files:
# esxcfg-boot -b
========================================================================================================
3.重新安裝ESX 4.1,但需保留datastore內資料。
4.之後應可進入ESX 4.1系統,查看欲開啟VM內的資料,如有*-ctk.vmdk的資料,便把它刪除。
再開啟vm,應可正常運作。