Powering on a virtual machine fails with the error: Failed to extend swap file from 0 KB to xxxx KB
search cancel

Powering on a virtual machine fails with the error: Failed to extend swap file from 0 KB to xxxx KB

book

Article ID: 341571

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Cannot power on a virtual machine
  • Powering on a virtual machine fails
  • You see the error:

    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.

    For example:
    • 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.


Environment

VMware vSphere ESXi 6.5
VMware vSphere ESXi 5.5
VMware vSphere ESXi 6.7
VMware vSphere ESXi 6.0

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

Note: These work arounds allow you to power on the virtual machine. However, you still need to investigate the underlying storage issue.

  • To workaround this issue when you see the No space left on device error, try one of these options:

Notes:
  • This article is updated regularly with other reasons that may cause this issue. Check this article for updates.
  • If you see a different reason for the failure, open a support request with VMware Support. For more information, see Filing a Support Request in Customer Connect (2006985).


Additional Information

打开虚拟机电源失败并显示错误:无法将交换文件从 0 KB 扩展到 xxxx KB
仮想マシンのパワー オンが次のエラーで失敗する:スワップ ファイルを 0 KB から xxxx KB に拡張できませんでした