Virtual Machine power on fails with 'Module Disk power on failed' after recovering files to a new datastore
search cancel

Virtual Machine power on fails with 'Module Disk power on failed' after recovering files to a new datastore

book

Article ID: 439755

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • Virtual machine power-on operation fails with following message in the vSphere client.
    Module Disk power on failed. Cannot open the disk '<Virtual Machine_#.vmdk>' or one of the snapshot disks it depends on. The system cannot find the file specified VMware ESX cannot find the virtual disk "<Virtual Machine_#.vmdk>". Verify the path is valid and try again.
  • One or more virtual disks connected to the virtual machine is inaccessible and virtual machine 'edit settings' shows error across the hard disk and 0 MB with message 'Disk capacity cannot be zero'.

  • Virtual machine's summary page shows informative message: "Some of the disks of the virtual machine <virtual_machine_name> failed to load. The information present for them in the virtual machine configuration may be incomplete"
  • Virtual machine files (vmx, vmdk, vswp etc) spread across more than one datastores had been restored to a different datastore and then the virtual machine was registered.
  • Virtual machine's vmware.log shows following snippets for cannot find the file specified.

YYYY-MM-DDTHH:MM In(05) worker-####### - Unable to find file Virtual Machine_1.vmdk
YYYY-MM-DDTHH:MM In(05) worker-####### - OBJLIB-FILEBE : FileBEOpen: can't open '/vmfs/volumes/########-#####235/Virtual Machine/Virtual Machine_#.vmdk' : Could not find the file (393218).
YYYY-MM-DDTHH:MM Er(02) worker-####### - DISKLIB-DSCPTR: DescriptorOpenInt: failed to open '/vmfs/volumes/########-#####235/Virtual Machine/Virtual Machine_#.vmdk' with flags 0x21: Could not find the file
YYYY-MM-DDTHH:MM Er(02) worker-####### - DISKLIB-DSCPTR: DescriptorOpen: Failed to open: The system cannot find the file specified
YYYY-MM-DDTHH:MM Er(02) worker-####### - DISKLIB-LINK  : DiskLinkOpen: Failed to open '/vmfs/volumes/########-#####235/Virtual Machine/Virtual Machine_#.vmdk': : The system cannot find the file specified
YYYY-MM-DDTHH:MM Er(02) worker-####### - DISKLIB-CHAIN : DiskChainOpen: "/vmfs/volumes/########-#####235/Virtual Machine/Virtual Machine_#.vmdk": failed to open: The system cannot find the file specified.

  • Virtual machine configuration file (vmx) points the to an incorrect datastore path (/vmfs/volumes/#######-#######235), while the VM files are currently placed in a different datastore.

less "/vmfs/volumes/#######-#######897/virtual machine.vmx"

scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "virtual machine.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.fileName = "/vmfs/volumes/#######-#######235/virtual machine_1.vmdk"

Environment

  • ESXi 8.x
  • ESX 9.x

Cause

This issue occurs when a virtual machine configuration file (.vmx) references outdated or incorrect datastore paths for its associated virtual disks. This path mismatch prevents the ESXi host from locating and initializing the virtual machine's .vmdk files, resulting in a virtual machine power-on failure.

Resolution

Note: Incorrect mapping of virtual disk in configuration may lead to data loss. Take backup of VM files before proceeding with the following steps.
 
 1. Connect SSH to the Host where the virtual machine is currently registered.

 2. Identify the datastore 'UUID' for the new datastore by running the below command from ESXCLi.

esxcli storage filesystem list

Example:

VM Virtual disks were previously located in Example-datastore1 and Example-datastore2. The VM files had been later restored to Example-datastore3 and Example-datastore4.

[root@<hostname>:~] esxcli storage filesystem list
Mount Point                           Volume Name           UUID                  Mounted  Type  
------------------------------------  --------------------  --------------------  -------  -----
/vmfs/volumes/########-#####124       Example-datastore1    ########-#####124      true    NFS          <------ Previous datastore
/vmfs/volumes/########-#####235       Example-datastore2    ########-#####235      true    NFS          <------ Previous datastore
/vmfs/volumes/########-#####897       Example-datastore3    ########-#####897      true    NFS          <------ New datastore
/vmfs/volumes/########-#####567       Example-datastore4    ########-#####567      true    NFS          <------ New datastore

 3. Change to virtual machine directory and locate the virtual machine confirmation file (vmx) file:

cd /vmfs/volumes/########-#####897/<virtual machine>/

 4. Take backup of the virtual machine configuration file 

 5.  Edit virtual machine configuration (vmx) file using vi editor with the following command: vi "virtual_machine.vmx"

a. replace the scsi#:#.fileName value to match the virtual disk in the new datastore.

Before:
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "virtual machine.vmdk" 
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.fileName = "/vmfs/volumes/#######-#######235/virtual machine_1.vmdk"

After:
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "virtual machine.vmdk" 
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.fileName = "/vmfs/volumes/#######-#######567/virtual machine_1.vmdk"

b. Update the swap file location (sched.swap.derivedName) in virtual machine configuration (vmx) file to the new datastore. This file typically resides in the same directory as the virtual machine configuration (vmx) file.

Before:
sched.swap.derivedName = "/vmfs/volumes/########-#####124/Virtual Machine/Virtual Machine-c###d###.vswp"

After:
sched.swap.derivedName = "/vmfs/volumes/########-#####897/Virtual Machine/Virtual Machine-c###d###.vswp"

     Save the file using 'Esc + :wq!' and press Enter to exit vi editor

 6. Identify the virtual machine ID (vm-id):  vim-cmd vmsvc/getallvms | grep -i <virtual_machine_name>

 7. Reload the virtual machine:  vim-cmd vmsvc/reload <vm-id>