vMotion fails with error "Insufficient permission to access the file" when migrating to a newly added host
search cancel

vMotion fails with error "Insufficient permission to access the file" when migrating to a newly added host

book

Article ID: 416690

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When migrating VM from existing host to a newly added host, the below errors are observed.

  • The vSphere Client displays following error while migrating a powered-off VM:

Unable to write VMX file: /vmfs/volumes/########-########/<VM_directory>/<VM_name>.vmx. Insufficient permission to access the file.

  • vMotion of a powered-on VM fails in the vSphere Client with a launch failure error and the task fails immediately:

A general system error occurred: Launch failure
YYYY-DD-MMTDD:MM Out of resources Cause: Out of resources.

  • hostd.log (path: /var/run/log/) reports inability to lock virtual machine configuration file (vmx) due Read-only file system.

YYYY-MM-DDTHH:MM Wa (164) Hostd[2287736] : [Originator@6876 sub=Libs opID=########-#####-auto-wyb-h5: #####-dc-01-b8-#### sid=######## user=vpxuser :<domain>\<Username>] FILE: FileIO_Lock on '/vmfs/volumes/########-########/<VM_directory>/<VM_name>.vmx' failed: Read-only file system.

  • vMotion may fail with error: A general system error occurred: vDS host error: see faultCause Cannot create DVPort 272 of VDS SHL-DvSwitch on the host
  • Storage vMotion may also fail with error: Cannot complete file creation operation.
  • vmkernel.log and vmkwarning.log (path: /var/run/log/) on the destination host reports permission denied while creating lck file on the NFS datastore.

vmkwarning.log: cpu64:2099265 opID=####10b7) WARNING: NFSLock: 4012: Failed to create .lck-69013e9d00000000 : Permission denied
vmkernel.log: cpu64:2099265 opID=####10b7) NFSLock: 5141: failed to get lock on file 221(.lck-69013e9d00000000) 0x430d435e7730 on NFS_Datastore <IP_address/hostname_of_the_NFS_server> (###.##.##.##) : Permission denied. fromunlink Y

Environment

  • ESXi 7.x
  • ESXi 8.x
  • ESX 9.x

Cause

This issue occurs because the newly added ESXi host does not have Root permission or has Read-Only permission on the shared NFS volume. While existing hosts possess full privileges, the permission discrepancy causes vMotion operations to fail when migrating VMs to the newly added host.

Resolution

Contact NAS storage administrator or the Storage vendor to grant the newly added ESXi host full Read/Write access with root privileges to the shared NFS volume.