How to Gracefully Terminate Stuck Datastore File Copy Operations in ESXi 6.5 Web Client


2 views

Many ESXi administrators encounter this scenario: You initiate a file transfer between datastores through the web interface, only to find the operation becomes unresponsive with no visible cancellation option. The web UI shows the operation as "In Progress" indefinitely, even when the transfer has clearly stalled or needs to be aborted.

The ESXi web client (particularly in 6.5 U1) has limited process control capabilities. Background file operations spawn core storage management processes that don't properly expose control hooks to the web interface layer. The GUI essentially loses visibility into the running operation.

To properly terminate the operation, you'll need CLI access. Here's the step-by-step procedure:

# 1. Connect via SSH (enable if disabled)
ssh root@esxi-host

# 2. Identify the copy process
esxcli system process list | grep -i "vsphere-client\|datastore"

# Sample output showing the culprit:
# 12345   root     /bin/vmware-vim-cmd hostsvc/datastore/browser_copy

# 3. Terminate the process cleanly
kill -15 12345  # SIGTERM first
sleep 5
kill -9 12345   # SIGKILL if needed

For those managing multiple hosts, PowerCLI provides a more scalable solution:

Connect-VIServer esxi-host
$vmhost = Get-VMHost | Get-View
$taskManager = Get-View $vmhost.Client.ServiceContent.TaskManager

# List recent tasks
$taskManager.RecentTask | Where-Object {
    $_.DescriptionId -match "Datastore.browserCopy"
} | Select Name, State

# Force cancel task (if in running state)
$stuckTask = $taskManager.RecentTask[0]
$taskManager.CancelTask($stuckTask.MoRef)
  • For large transfers, always use the CLI: vmkfstools -i source.vmdk destination.vmdk
  • Monitor transfers with: watch -n 5 'ls -lah /vmfs/volumes/datastore/path'
  • Consider enabling SSH persistent sessions for long operations

The web client's copy operation ultimately executes through the hostd service using the VIM API. When stalled, the underlying SOAP connection may timeout while the backend operation continues. This architectural gap explains why the web interface loses control visibility.


When working with VMware ESXi 6.5's web interface, you might encounter situations where a datastore file copy operation becomes unresponsive or takes excessively long. The web client provides limited control over ongoing operations, leaving administrators searching for alternative termination methods.

The ESXi web client initiates file operations through vCenter Server's Virtual Disk Manager (vpxd). These operations spawn background tasks that aren't always properly exposed in the UI for cancellation. The operation you're seeing is likely a vSphere VirtualMachine:CopyVirtualDisk_Task process.

When the web interface fails to provide cancellation options, SSH access allows direct process management:

# First, identify the copy process
ps -c | grep vmkfstools

# Sample output might show:
# 12345 vmkfstools --clonevirtualdisk /vmfs/volumes/src/datastore.vmdk --diskformat thin /vmfs/volumes/dest/datastore.vmdk

# Terminate the process gracefully
kill -15 12345

# If unresponsive, force termination
kill -9 12345

For administrators managing multiple systems, a PowerCLI script can help identify and stop rogue copy operations:

Connect-VIServer -Server your_esxi_host

$tasks = Get-Task | Where-Object { $_.Name -eq "VirtualMachine.CopyVirtualDisk_Task" -and $_.State -eq "Running" }

foreach ($task in $tasks) {
    Write-Host "Stopping task $($task.Id) - $($task.Description)"
    Stop-Task -Task $task -Confirm:$false
}

To avoid this situation in the future:

  • Use the vSphere CLI (vCLI) for large file transfers: vicfg-scp.pl --server esxi_host --username root "source.vmdk" "destination.vmdk"
  • For automated processes, implement timeout checks in your scripts
  • Monitor datastore performance metrics before initiating transfers

After terminating the operation, check the vmkernel.log to verify clean termination:

cat /var/log/vmkernel.log | grep -i "terminated copy"