VMs fail to power on with error Failed to create swap file on vSAN cluster
search cancel

VMs fail to power on with error Failed to create swap file on vSAN cluster

book

Article ID: 385058

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

A healthy vSAN cluster may not be able to power on new VMs with the error, “Failed to create swap file”, or may not be able to vMotion or create new VMs. This could be due to the vSAN cluster not being licensed properly or the hosts no longer reflecting the required licensed features such as vit, all-flash, stretched cluster, erasure coding, storage efficiency or encryption. 

Failed to create swap file '/vmfs/volumes/vsan:52508016b672d6ec-################/.../VC1.vswp': Failure.

 

Environment

VMware vSAN (All Versions)

Cause

This can be caused by having the improper vSAN license which doesn't support the features trying to be used, an Evaluation License was in use an expired, or the hosts in the cluster don't reflect the licensed features in use per the license applied to the cluster. 

If vCenter is accessible click on the hamburger menu in the upper left, select Administration > Licensing > Licenses and check the vSAN licenses applied to the cluster.

If vCenter is not accessible as it's one of the VMs that is impacted check to see if the hosts reflect the appropriate licensed features per the vSAN license applied to the cluster on each host by running vsish -e get /config/VSAN/strOpts/LicensedFeatures

Here we see the "Current Value" is empty and no vSAN features are enabled.   

#  vsish -e get /config/VSAN/strOpts/LicensedFeatures

Vmkernel Config Option [string] {
   Default value:allflash,stretchedcluster
   valid characters:**
   Current value:
   hidden config option:1
   Description:List of licensed vSAN features for this host
   Host specific config option:0
   Option update requires reboot:0
   Option update requires maintenance mode:0
}

This should return a list of features enabled on the host per the license applied to the cluster such as in the example below. 

#  vsish -e get /config/VSAN/strOpts/LicensedFeatures
Vmkernel Config Option [string] {
   Default value:allflash,stretchedcluster
   valid characters:**
   Current value:vit,allflash,stretchedcluster,erasurecoding,storageefficiency,encryption
   hidden config option:1
   Description:List of licensed vSAN features for this host
   Host specific config option:0
   Option update requires reboot:0
   Option update requires maintenance mode:0

 

 

Resolution

If the Evaluation license is expired or you don't have the proper license for RAID5/6 which requires a vSAN Advanced license or higher, open a case with our GCA team and acquire the proper licensing.

If purchased licensed features are missing on the host please open an SR with VMware by Broadcom so we can address the issue. 

 

Additional Information