Adding a hard disk to a powered on VM fails with error: Cannot open the disk '/vmfs/volumes/datastore_dir/vm_dir/vm.vmdk' or one of the snapshot disks it depends on
search cancel

Adding a hard disk to a powered on VM fails with error: Cannot open the disk '/vmfs/volumes/datastore_dir/vm_dir/vm.vmdk' or one of the snapshot disks it depends on

book

Article ID: 334252

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Cannot hot-add a hard disk to a powered on virtual machine
  • Adding an existing virtual machine disk (VMDK) to a virtual machine that is already powered on fails.
  • You see the error:

    Failed to add disk scsi0:1.
    Failed to power on scsi0:1.
    Reason: REASON
    Cannot open the disk '/vmfs/volumes/datastore_dir/vm_dir/vm.vmdk' or one of the snapshot disks it depends on


    Where REASON can be any one of these:

    • Could not open/create change tracking file
    • I/O error accessing change tracking file
    • Failed to lock the file
    • The file already exists
    • Insufficient permission to access file
    • Input/output error
    • Cannot allocate memory


Cause

This issue may occur due to one of these reasons:
  • Could not open/create change tracking file
  • I/O error accessing change tracking file
  • Failed to lock the file
  • The file already exists
  • Insufficient permission to access file
  • Input/output error
  • Cannot allocate memory

Resolution

This table list the issues, cause of the issues, and the its corresponding resolution:
 
Error Cause Resolution
Could not open/create change tracking file This issue occur when reference to a filename-ctk.vmdk file, created when Change Block Tracking (CBT) was enabled for the virtual machine,
is not cleared in the virtual machine's configuration file when CBT is no longer enabled.
To resolve this issue, see Powering on a virtual machine fails after a storage outage with the error: could not open/create change tracking file (2009244).
I/O error accessing change tracking file This issue occurs if an ESXi host has a problem in reading/writing to the change tracking file for a virtual machine that has CBT enabled. The reason for the I/O errors could be an issue with the storage device or the data store on which the file is located.
To troubleshoot any issues related to storage devices and data stores, see Troubleshooting storage issues when using VMware products (2013160).
 
If the problem persists, file a support request. For more information how to file a support request, see Creating and managing Broadcom support cases.
Failed to lock the file To prevent concurrent changes to critical virtual machine files and file systems, ESXi/ESX hosts establish locks on these files. In certain circumstances, these locks may not be released when the virtual machine is powered off, thereby causing this error, when the virtual machine is powered on later in the cluster. To resolve this issue, see Investigating virtual machine file locks on ESXi (10051).
The file already exists This issue occurs if the virtual machine was already configured with the virtual disk that is being hot-added to the virtual machine. To resolve this issue, ensure that the virtual disk which is being added to the virtual machine is not already in use by the same virtual machine.
Insufficient permission to access file This issue is usually observed in virtual machines located on NFS datastores. This issue may occur due to permissions issues on the NFS datastore. To resolve this issue, ensure that the host has the correct read/write permissions to access the NFS export.
If your storage array has the No Root Squash option, ensure that the option is enabled or contact your Storage Administrator.
(Input/output error) This issue occurs if ESXi host has a problem accessing the underlying storage devices or data stores.
Troubleshoot and resolve any issues with the underlying storage devices:
(Cannot allocate memory) This issue occurs if any of the software component in the ESXi storage stack, such as VMFS module, ran out of heap memory capacity.
Another instance where this can occur is if there are lot of stale snapshot files in the data store on which the virtual machine is located.
 
 
Notes: If you see a different reason for the failure, open a support request with VMware Support. For more information, see Creating and managing Broadcom support cases.



Additional Information

These articles provide information that may be related to this issue:

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box

“could not open/create change tracking files” error when powering on VM
Troubleshooting storage issues when using VMware products