Failed to create swap file in vSAN environment, resulting in failed migration and power on VM with vMotion
search cancel

Failed to create swap file in vSAN environment, resulting in failed migration and power on VM with vMotion

book

Article ID: 427362

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vSAN

Issue/Introduction

Symptoms

  • Failed to power on VM on the destination ESXi host when migrated with vMotion

  • Using a vSAN datastore

  • " Failed to create swap file " and " Failed to power on VM " are recorded in vmware.log :
    YYYY-MM-DDTHH:MM:SS.000Z In(05) vmx - [vob.swap.poweron.createfailure.status] Failed to create swap file '/vmfs/volumes/vsan:<UUID>/<UUID>/<VM-Name>.vswp' : Failure
    YYYY-MM-DDTHH:MM:SS.000Z In(05) vmx - [msg.vmmonVMK.creatVMFailed] Could not power on virtual machine: Failure.
    YYYY-MM-DDTHH:MM:SS.000Z In(05) vmx - [msg.monitorLoop.createVMFailed.vmk] Failed to power on VM.
  • The swapobjd.log on the destination ESXi records "Bad parameter (0xbad0007)", causing the creation of the vSAN vswp object to fail.
    YYYY-MM-DDTHH:MM:SS.000Z Er(11) swapobjd[0000000]: 00000000: OBJLIB-VSANOBJ: VsanObjGetExtParams: Could not unmarshal extended attributes: Bad parameter (0xbad0007).
    <snip>
    YYYY-MM-DDTHH:MM:SS.000Z Er(11) swapobjd[0000000]: 00000000:SwapObjCreateFileInt:298: Failed to create object /vmfs/volumes/vsan:<UUID>/<UUID>/<VM-Name>.vswp (Invalid argument).

Environment

VMware vSAN 8.0

VMware vSphere ESXi 8.0

Cause

This is a known issue in vSAN.

Resolution

Rerun the vMotion to migrate the VM.

This issue has been fixed in vSAN 9.0, and we are planning a release with the fix for vSAN 8.0.