3 Replies Latest reply on Nov 12, 2011 8:00 AM by Venzhofer

    Virtual Machine Swapfile Location error

    TommyDJ201110141 Lurker



      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 "" 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,


        • 1. Re: Virtual Machine Swapfile Location error
          depping Champion
          VMware EmployeesUser Moderators



          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

          • 2. Re: Virtual Machine Swapfile Location error
            DCjay Enthusiast

            Duncan is absolutely right. I did same someyime ago.

            The line you to change is

            sched.swap.derivedName = ".vswp location"


            Hope this helps

            • 3. Re: Virtual Machine Swapfile Location error
              Venzhofer Novice

              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:

                             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.