On a standalone VMware host running ESXi 6.5 I'm unable to get the host cache and VM swapfiles to change datastore.
It was running ESXi 6.0 (and I used to administer it with the legacy vSphere Client, might be relevant?) and it had a 128GB SSD0 as only SSD datastore.
Until the host was running ESXi 6.0 SSD0 was configured for both host cache and swapfile location (two different settings in the legacy client).
Then it was updateded to ESXi 6.5 using the coventional way for standalone hosts, with this command in ssh while in maintenance mode:
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.5.0-20181004001-standard
After the update (and a few months) SSD0 became too small for the number of running VMs and I added 480Gb SSD1 too.
I went to the web client since there's no more legacy vSphere client in 6.5 and I've set the only available swap/cache option (in Host > Manage > System > Swap) to SSD1.
I've shutdown all running VMs and made an host reboot. Even after such operation, SSD0 has sys swap and VM's swapfiles, and SSD1 is still empty.
HW details:
Dell T130 latest (Dec. '18) UEFI 2.5.0, Xeon E3-1240v5, 64GB ECC, PERC H730 1GB NVcache + BBU, SSD0 is Sandisk's Plus-128, SSD1 is Sandisk's Ultra-480. Both drives are correctly seen as SSD storage by both PERC's bios and the VMware Hypervisor.
SW details: Running image: free license 6.5.0 Update 2 (Build 10884925). At the time of update, the server was running ESXi-6.0.0-20180904001-standard
I've found you can configure and set the swap datastore with
esxcli sched swap system get
The `get` command shows the correct result. The `set` command followed by a `reboot` changes anything. Swap files for both VM and hostcache still reside in SSD0.
[root@xXx:~] esxcli sched swap system get Datastore Active: false Datastore Enabled: true Datastore Name: SSD1 Datastore Order: 1 Hostcache Active: true Hostcache Enabled: true Hostcache Order: 0 Hostlocalswap Active: false Hostlocalswap Enabled: true Hostlocalswap Order: 2 [root@xXx:~] find /vmfs/volumes/SSD*/ -maxdepth 1 -type f -name *swp /vmfs/volumes/SSD0/sysSwap-hc-57487483-06f8-5d5a-47cb-a0369f9b821a.swp /vmfs/volumes/SSD0/vmx-aaa-209631360-1.vswp /vmfs/volumes/SSD0/aaa-0c7eb880.vswp /vmfs/volumes/SSD0/vmx-bbb-4128220575-1.vswp /vmfs/volumes/SSD0/bbb-f60fa59f.vswp /vmfs/volumes/SSD0/vmx-ccc-2862447631-1.vswp /vmfs/volumes/SSD0/ccc-aa9d7c0f.vswp [root@xXx:~] ls -la /vmfs/volumes/SSD1/ total 1480832 drwxr-xr-t 1 root root 73728 Dec 3 11:51 . drwxr-xr-x 1 root root 512 Dec 5 10:47 .. -r-------- 1 root root 8216576 Dec 1 14:05 .fbb.sf -r-------- 1 root root 134807552 Dec 1 14:05 .fdc.sf -r-------- 1 root root 268632064 Dec 1 14:05 .jbc.sf -r-------- 1 root root 16908288 Dec 1 14:05 .pb2.sf -r-------- 1 root root 65536 Dec 1 14:05 .pbc.sf -r-------- 1 root root 1074331648 Dec 1 14:05 .sbc.sf drwx------ 1 root root 69632 Dec 1 14:05 .sdd.sf -r-------- 1 root root 7340032 Dec 1 14:05 .vh.sf drwxr-xr-x 1 root root 73728 Oct 4 13:02 dddd [root@xXx:~]
The setting in the web panel looks good across reboots, shows SSD1 as the setting was correctly saved but it's not applied!
How to further diagnose and fix this behavior?
fixed formatting, improved readability
