Unable to Delete Virtual Machine from Disk: "Cannot complete the operation due to an incorrect request to the server"
search cancel

Unable to Delete Virtual Machine from Disk: "Cannot complete the operation due to an incorrect request to the server"

book

Article ID: 453980

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When attempting to delete a virtual machine from disk in VMware vSphere, the operation fails with the following error message:

"Cannot complete the operation due to an incorrect request to the server."

This behavior occurs when the deletion task is blocked, typically due to existing file locks on the virtual machine disks (VMDKs) 

Environment

  • VMware vSphere ESXi
  • VMware vCenter Server

Cause

Backup Proxy Locks: A backup solution proxy VM (e.g., Rubrik, Veeam, etc.) holds an active lock on the VMDK files of the target virtual machine, preventing the deletion operation.

Resolution

Identify the target virtual machine name and the datastore where its files are located.

 

Steps for Backup Proxy Locks

  1. Identify the Lock: Check the vSphere inventory for any virtual machine backup proxy appliances.
    1. Run from ESXi CLI
      vmfsfilelockinfo -p /vmfs/volumes/<path>/<VMname.vmdk>
    2. Run and take note of the Process ID number
      lsof | grep -i <"VMname.vmdk">
    3. Run 
      lsof | grep -i <Process ID number>
    4. Identify the .lck file from previous command. That will be the location of the VM holding the lock
  2. Inspect Proxy Settings: Right-click the proxy VM holding the lock and select Edit Settings.
  3. Remove Disk: Expand the hard disk section and check for any virtual disks matching the files of the target VM you wish to delete.
  4. Release Lock: If a matching disk is found, select Remove device (ensure no backup job is currently running and consult your backup vendor documentation regarding the impact of removing disks from a proxy).
  5. Retry Deletion: Attempt the deletion operation for the target VM again via the vSphere Client.