在 VMware Hypervisor (ESXi) 下使用 VMware Workstation / VMware Fusion 等 VMDK 硬碟檔案

在 VMware 的桌面版本中使用的硬碟,或者使用 qemu-img 轉換的 VMDK 檔案,直接拿到 VMware Hypervisor 上是沒有辦法好好使用的。如果硬碟控制器不使用 IDE 接口,那麼啓動的時候就會提示

Module DevicePowerOn power on failed.
Unable to create virtual SCSI device for scsi0:0, ‘/vmfs/volumes/datastorename/VirtualMachineHome/VirtualMachineDisk.vmdk’
Failed to open disk scsi0:0: Unsupported and/or invalid disk type 7. Did you forget to import the disk first?

解決方法是 ssh 連接到 VMware Hypervisor,使用 vmkfstools,轉換一下:

vmkfstools -i /vmfs/volumes/ssd/folder/workstation.vmdk /vmfs/volumes/ssd/folder/hypervisor.vmdk

如果在 VMFS 6 的話(不確認是否前提條件),還可以啓用 Thin Provisioning:

vmkfstools -i /vmfs/volumes/ssd/folder/workstation.vmdk /vmfs/volumes/ssd/folder/hypervisor.vmdk -d thin

Comments

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)