cannot find vmdk file

使用vcenter圖形介面中的vm直接關機shutdown host,之後虛擬機無法power on,原因為找不到vmdk檔。依下面指示,重建一個vmdk檔,並在文檔中建立與vmname-flat.vmdk的連結,定義是否為thin provisioned,然後就可以重新開機了。

注意:下次必需要以遠端介面或ssh下關機指令才不會再發生此錯誤!

以下文字來源source link: 此連結

This article provides steps to recreate a lost virtual disk descriptor file (VMDK). You may need to recreate missing header/descriptor files if:

Solution

Note: Command-line methods, such as the one covered in this video, are available for ESXi 6.0, 5.x, 4.1, and earlier. 

Overview steps

Note: VMware recommends to attempt to restore the missing descriptor file from backups if possible. If this is not possible, proceed with recreating the virtual machine disk descriptor file. This method cannot be used to recreate an encrypted disk descriptor file.

To create a virtual machine disk descriptor file:

Note: This procedure will not work on virtual disks configured with a Para-virtualized SCSI controller in the virtual machine as the virtual machine may not boot. However, there are reports that if the Para-virtualized SCSI controller is used, the new descriptor file can also be updated with ddb.adapterType = pvscsi replacing ddb.adapterType = lsilogic in the descriptor file.

Detailed steps

To create a virtual machine disk:

此虛擬機器在vcenter的圖形介面中,hard disk的說明中沒有勾選thin(隨使用量改變),因此把vmdk檔中的文字ddb.thinProvisioned = "1"刪掉後,才能正常開機。