一個完整的 VM 必須包含有兩個檔案:
如果有發生 VM 啟動失敗,而原因是 VM 定義檔遺失。
以 esxconsole.vmdk 為例 (esxconsole 是 ESX 主機在開機時必須要使用的虛擬系統)
解決方法有二:
官方教學: Recreating a missing virtual machine disk (VMDK) descriptor file (1002511)
切換到 VM 的檔案目錄
# cd /vmfs/volumes/4d9eab94-5b35e5a5.../esxconsole-4d9eaabc-6870-.../ # ls -l -rw------- 1 root root 7973371904 Mar 12 11:48 esxconsole-flat.vmdk # vmkfstools -c 7973371904 -a buslogic -d thin temp.vmdk # rm temp-flat.vmdk # mv temp.vmdk esxconsole.vmdk
Note:
vmkfstools -c <temp-flat.vmdk 的 size> -a <虛擬裝置類型 buslogic 或 lsilogic> -d thin temp.vmdk
-d thin 這可以減少產生 temp-flat.vmdk 所耗用的空間虛擬裝置類型設定
如果是一般 ESX 內所建立的 VM 很有可能是 lsilogic,可以檢查 .vmx
如果是 ESX 核心所用的 esxconsole,就可能是 buslogic
編輯 esxconsole.vmdk:
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfs"
# Extent description
RW 8388608 VMFS "esxconsole-flat.vmdk" <== 編輯
# The Disk Data Base
#DDB
ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "buslogic"
ddb.thinProvisioned = "1" <== 刪除
確認 esxconsole.vmdk 是否可用
for ESX 5.x
# vmkfstools -e filename.vmdk For a complete chain, you see output similar to: Disk chain is consistent For a broken chain, you will see a summary of the snapshot chain and then an output similar to: Disk chain is not consistent : The parent virtual disk has been modified since the child was created. The content ID of the parent virtual disk does not match the corresponding parent content ID in the child (18)
for ESX 3.5/4.x
# vmkfstools -q filename.vmdk For a complete chain, you see output similar to: filename.vmdk is not an rdm For a broken chain, you see output similar to: Failed to open 'test-000001.vmdk' : The parent virtual disk has been modified since the child was created (18)
Note: The primary purpose of the vmkfstools -q command is(from the vmkfstools help page: vmkfstools -h): -q --queryrdm. This command will identify any issues with the snapshot chain, not its intended purpose, which is to identify if the vmdk disk is a raw device mapping.
文件 | 大小 | 日期 | 附件上傳者 | |||
---|---|---|---|---|---|---|
VMware KB Recreating a missing virtual machine disk (VMDK) descriptor file.pdf Recreating a missing virtual machine disk (VMDK) descriptor file | 200.34 KB | 18:00, 11 Mar 2013 | alang | 動作 |
Images 0 | ||
---|---|---|
No images to display in the gallery. |