Error: "Failed to extend swap file from 0 KB to #### KB" when attempting to power on a virtual machine
search cancel

Error: "Failed to extend swap file from 0 KB to #### KB" when attempting to power on a virtual machine

book

Article ID: 341571

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • When attempting to power on the virtual machine, it may fail with the following error message:

    "Module MonitorLoop power on failed. Failed to start the virtual machine. Failed to power on VM. Could not power on virtual machine: No space left on device. Failed to extend the virtual machine swap file Current swap file size is O KB. Failed to extend swap file/vmfs/volumes/#######-#########-#####-#############/VM/VM-name.vswpfrom 0 KB to 536870912 KB : No space left on device"


Examples:
An unexpected error was received from the ESX host while powering on VM vm-124.
Failed to power on VM.
Could not power on VM : No space left on device.
Failed to extend swap file from 0 KB to 1048576 KB
An unexpected error was received from the ESX host while powering on VM vm-49.

Failed to power on VM.
Could not power on VM : Invalid metadata.
Failed to extend swap file from 0 KB to 2097152 KB.

Failed to power on VM. Could not power on virtual machine: Storage initiator error.
Failed to extend the virtual machine swap file Current swap file size is 0 KB. 

Environment

VMware ESXi 7.x
VMware ESXi 8.x

Cause

  • This issue occurs if the ESX host is unable to create the swap file required to power on the virtual machine. This is most likely due to a storage problem on the datastore where the swap file is located.

  • If the host is unable to communicate with the Storage due to faulty HBA etc., then power on might fail with the error "Storage initiator error"

Resolution

Workaround:

When the 'Invalid metadata' error is seen, attempt one of the following options:

When the 'No space left on device' error is seen, attempt one of the following options:

When the "Storage initiator error" is seen, it is essential to validate from the vmkernel.log of the host and see if it reports Sense code H:0x7 D:0x0 P:0x0 for the LUN backing the datastore. Migrating the VM to any other hosts should help the VM to be powered on. 

Note: These workarounds allow the VM to power on. However, investigation into the underlying storage issue is still needed.

Additional Information

This article is updated regularly with other reasons that may cause this issue. If there is a different reason for the failure, open a support request with Broadcom support. For more information, see Creating and managing Broadcom support cases.