I'm having some problems setting up the VM Swapfile Location... When I enter the tab and it says 'Getting data...' I soon receive the following error:
Call "PropertyCollector.RetrieveContents" for object "ha-property-collector" on ESXi "192.168.0.180" failed.
After I press 'Close' it just sits at 'Getting data...' and won't let me change anything. This is probably because the datastore I originally set it to, has been lost. I tried recreating another datastore with the same name and folder structure, but it doesn't fall for it.
Is there any way to manually edit this location, through advanced settings or SSH? Help would be greatly appreciated.
Thanks in advance,
just go to the console and go to the folder where the vmx is stored of the vm. all the way down of the vmx there should be a "sched.swap" or something like that. Just change it to the right location. (it uses the vmfs identifier as you will notice and that is why adding a new datastore with the same name won't work!)
Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive
I found myself in a simillar situation during the update from vSphere 4.1 to 5 and upgrade of VMFS datastores from VMFS 3 to 5.
After I've found this thread it seemed to me like a lots of work to manually adjust swapfile location for each vmx.
So I investigated in vCenter MOB and found easy way out.
You have to go through:
childEntity (pick the right DC)
childEntity (pick the right cluster)
host (pick the right host)
and there you Invoke the "UpdateLocalSwapDatastore" method with cleared parameter value.
This will reset the Local Swapfile Datastore on the particular host to default value.
Then you can set the right datastore from the GUI.