VMware Cloud Community
VPeta
Contributor
Contributor

global vSphere swap dir configuration

Hello,

I'm using vSphere Hypervisor free edition (HPE custom image). I have a RAID-6 storage volume consisting of 4 WD RE harddisks. Due to loud access sounds of these 4 WD RE when running a VM even in idle mode I decided to add another WD RED harddisk with 5400 rpm for swap.

I setup the vSphere host under Manage>System>Swap

Enable = yes

Datastore = located to the 5400 rpm WD RED harddisk

Host cache = yes

Local swap = yes

and under Manage/System/Advanced settings

ScratchConfig.ConfiguredScratchLocation = located to the 5400rpm WD RED harddisk

After reboot the vSphere host swap works as expected.

Except the VMs do not use the 5400 rpm WD RED harddisk for swap. I cross checked each VM uses Swap file location = Datastore specified by host under VM settings>VM Options>Advanced but not until I add the sched.swap.dir attribute as a Configuration attribute a VM uses the 5400 rpm WD RED harddisk.

Why does global swap location not work?

0 Kudos
2 Replies
parmarr
VMware Employee
VMware Employee

Hi,

Assuming you are using the latest 6.5 version of the Free hypervisor?

Global swap "allows the use of"

About System Swap

https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.resmgmt.doc/GUID-56608D3C-3C93-4D03...

Configure System Swap

https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.resmgmt.doc/GUID-C0DBB2A3-4B44-45BE...

Afaik, to force it to use a specific datastore you must use the sched.swap.dir

Storing a virtual machine swap file in a location other than the default in ESX/ESXi

http://kb.vmware.com/kb/1004082

Does it work when you force the host using this parameter? Nice and quiet-ish now?

Sincerely, Rahul Parmar VMware Support Moderator
0 Kudos
VPeta
Contributor
Contributor

A few notes to my configuration in advance:

  • system is 6.5.0 Update 1 (Build 5969303)
  • vSphere host system installed on HP MicroSD
  • STORAGE is a RAID-6 volume on HPE P222 controller
  • STORAGE contains VMs
  • SWAP is a single WD RED 2,5 drive on HP smart array B120i
  • each volume configuration is done via /vmfs/volumes/<UUID of drive/volume>
  • due to MicroSD installation scratch folder (.locker) is default located on STORAGE (SWAP was installed subsequent)

Default install of vSphere produces drive access even if no VM is running resulting in a harddisk click-clack access noise every 2-3 seconds that drives me insane :smileycool: (host machine is a HPE Proliant Microserver Gen8 located besides my desk). As written before I located scratch folder to self-generated folder on SWAP/.locker by editing <ScratchConfig.ConfiguredScratchLocation> path. The harddisk click-clack noise every 2-3 second is gone until one VM is started. Looking in the VM folder on STORAGE of a VM that has been started shows two .vswp files that are created as soon as the VM boots up. Adding sched.swap.dir in the advanced VM configuration parameters causes that at least one of the two .vdsk files is created on SWAP. But harddisk access click-clack noise remains…

So, finally to answer your question "Does it work when you force the host using this parameter? Nice and quiet-ish now?" No, unfortunately not…:smileycry:

0 Kudos