VMware Cloud Community
TommyDJ20111014
Contributor
Contributor

Virtual Machine Swapfile Location error

Hello,

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,

Tommy.

0 Kudos
3 Replies
depping
Leadership
Leadership

Yes,

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!)

Duncan (VCDX)

Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive

0 Kudos
DCjay
Enthusiast
Enthusiast

Duncan is absolutely right. I did same someyime ago.

The line you to change is

sched.swap.derivedName = ".vswp location"

Hope this helps

0 Kudos
Venzhofer
Contributor
Contributor

Hey guys!

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:

     content
          rootFolder
               childEntity     (pick the right DC)
                    hostFolder
                         childEntity     (pick the right cluster)
                              host    (pick the right host)
                                   configManager
                                        datastoreSystem

     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.

Josef

0 Kudos