VMware Cloud Community
oasisinin
Enthusiast
Enthusiast

sysSwap-hls-xxxxxxx.swp Files (Esxi 5.5)

Where can I find some relevant information about sysSwap-hls-xxxxxxx.swp created in a datastore?

No of files are same as number of hosts and .swp files are only found when hosts are in a cluster. I dont see these files for a stand-alone esxi host

found a lil info on VMTN but they dont give any insight.

Thank You in advance

Tags (3)
13 Replies
VirtualMattCT
Enthusiast
Enthusiast

I'm curious about the same thing.  Can't dismount a datastore, even though it passes all the checks successfully (vSphere 5.1).  Anyone have insight?

julezatmortonbu
Enthusiast
Enthusiast

I to would like to know what these are.  And why I cannot unmount the datastore.
I have a pair of them that are consuming a gig of storage in an old swap file datastore that we are doing away with and instead will be storing swap files with the VM on our new array.

0 Kudos
julezatmortonbu
Enthusiast
Enthusiast

I was on the phone with VMware support this morning who is supposed to get back to me on this issue.  I was told that another application makes these swp files...  Curious what storage system(s) are you guys using?  And are you using vcenter ops manager?

0 Kudos
oasisinin
Enthusiast
Enthusiast

I wonder what applications use these "swap" files?

only scenario i have seen these swap files is when we have diff "Virtual Machine Swapfile Location" than default, under advance settings

BTW, we are on NetApp and not using vcops anymore

0 Kudos
julezatmortonbu
Enthusiast
Enthusiast

Yeah we were actually using the NetApp best practice of having a dedicated swap file datastore.  We're in the process of moving off of our NetApp storage.  As we did the migrations I was scripting a group of VMs to override the cluster settings to store the vswp files with the VM.  I did a svmotion to the new storage array, then did a vmotion to another host to move the VM's swap file.  After we finished the migration of all the VMs to the new storage, we changed the cluster settings for the dedicated swap datastore to store with the VM.  Then I basically reversed the script that did the VM override on swap file location.  So in theory all swap files should have been moved.

Unfortunately in our case we have a bunch of vmx-VMNAME-xxxxxx.vswp files left on that datastore that are all roughly 100mb each.

Then on top of that we have the sysSwap-hls files as well that are about a gig a piece.
All of these files seem to be locked or in use as they cannot be deleted and the datastore can not be offlined.

0 Kudos
julezatmortonbu
Enthusiast
Enthusiast

Actually I just figured out apparently doing another vmotion after making that cluster change seemed to have solved the vmx-xxxxxx.vswp file problem for me.  But I still have the sysSwap file issue.

0 Kudos
VirtualMattCT
Enthusiast
Enthusiast

For what it's worth - I think it has something to do with VM swap file location, even if you move them after the fact.  I ended up doing a maintenance mode/reboot cycle and that cleared them out.  It does seem vSphere/ESX/host related and not something that has to do with 3rd party software.

julezatmortonbu
Enthusiast
Enthusiast

VirtualMattCT thanks for that info, seems to have resolved my issues as well.

Just need to notify VMware support it was resolved by the VMware forums rather than them.

0 Kudos
ramakrishnak
VMware Employee
VMware Employee

This is the system-wide Swap files which gets created based on the system advanced swap file settings

-hls-* stands for hostlocal swap file.

In general you can end up with 3 different types of system-wide swap files based on the system advanced swap file settings and usage

Datastore   -> sysSwap-ds-*

SSDDatastore -> sysSwap-hc-*

HostLocal'   ->  sysSwap-hls-*

you can check the system wide swap settings here

# esxcli sched swap system get

   Datastore Active: false

   Datastore Enabled: false

   Datastore Name:

   Datastore Order: 0

   Hostcache Active: false

   Hostcache Enabled: true

   Hostcache Order: 1

   Hostlocalswap Active: false

   Hostlocalswap Enabled: true

   Hostlocalswap Order: 2

Thanks

farkasharry
Hot Shot
Hot Shot

I had a similar issue with these host local swap files and found the proper solution:

After I found out the host that was still using the datastore (unmounting all the others, but these one could not be unmounted) I ssh-ed to the host and checked:

esxcli sched swap system get

Here I saw that host local swap was enabled. By entering:

esxcli sched swap system set --host_localswap_enabled -false   (see docu here: VMware vSphere 5.1))


After the host local swap has been disabled, I could unmount the datastore without issues!


I hope it helps...

*** If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful! *** vExpert 2019, VCAP-DCA,VCP,MCSE,MCITS and some more...
0 Kudos
RajuVCP
Hot Shot
Hot Shot

Hi Farkasharry,

what is the exact command you used to disable the host localswap file.

i tried below  given command but it says command didnt found.

# esxcli sched swap system set --hostlocalswap-enabled | -l (didnt worked Smiley Sad)

#esxcli sched swap system set --host_localswap_enabled | -l ( didnt worked Smiley Sad)

I can able to get the command

# esxcli sched swap system get

Can you help in what is the exact command we need to use to disable it.

Raju Gunnal VCP 4, VCP 5, VTSP 4, VTSP 5, ITIL V3 http://www.techtosolution.com
0 Kudos
homerzzz
Hot Shot
Hot Shot

esxcli sched swap system set --hostlocalswap-enabled false

or

esxcli sched swap system set -l false

0 Kudos
Satai
Contributor
Contributor

Rebooting hosts worked for me.

0 Kudos