→ Applies to: VMware ESXi 7.0.3K
Symptom
A vmdk file is not usable on new or old datastores.
Solution
Step 1. Connect to VMware ESXi CLI (via SSH)
Step 2. Retrieve VM id
vim-cmd vmsvc/getallvms
Step 3. Login to VMware ESXi GUI
Step 4. Retrieve VM path
Step 5. Connect to VMware ESXi CLI (via SSH)
Step 6. Run the following command (replace <vm-id> with the correct number at Step 2. and <vm-path> with the correct path at Step 4.):
vim-cmd vmsvc/device.diskaddexisting <vm-id> <vm-path> 0 1
EXAMPLE:
vim-cmd vmsvc/device.diskaddexisting 11 /vmfs/volumes/cc0cb3a6-f2e17fd1/Zabbix/Zabbix.vmdk 0 1