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: 02-25-2025

Products

VMware vSphere ESXi

Issue/Introduction

  • Cannot power on a virtual machine
  • Powering on a virtual machine fails
  • The following errors are possible:

    An unexpected error was received from the ESX host while powering on VM <VM_name>
    Could not power on VM : Reason
    Failed to power on VM
    Failed to extend swap file from 0 KB to size KB

    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.

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.

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:

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.