Error: "Cannot open the configuration file" when trying to power on VM
searchcancel
Error: "Cannot open the configuration file" when trying to power on VM
book
Article ID: 308383
calendar_today
Updated On: 04-09-2025
Products
VMware vCenter ServerVMware vSphere ESXi
Issue/Introduction
Symptoms:
Powering on a virtual machine fails
Cannot power on a virtual machine
You see this error:
Cannot open the configuration file /vmfs/volumes/datastore/virtual machine.vmx.
An error occurred while creating temporary file for /vmfs/volumes/datastore/VM directory/VM name.vmx: The file already exists.
Environment
VMware vCenter Server 7.0.x
VMware vSphere ESXi 7.0.x
VMware vCenter Server 8.0.x
VMware vSphere ESXi 8.0.x
Cause
This issue occurs if the .vmx~ file created while powering on the machine continues to remain on the datastore even after the virtual machine is powered off.
Resolution
To resolve this issue, delete the.vmx~ file:
Open an SSH session to the host that the virtual machine is registered to
Confirm that there is a .vmx file which ends in ~: vm name.vmx~
cd /vmfs/volumes/datastore/VM directory ls -lrt
Confirm that all virtual machine files are not locked: