propertyCollector Error When Editing Virtual Machine Swapfile Location

Today I came across the following propertyCollector error message whilst trying to modify the VM Swapfile location for two hosts in my lab cluster. This pops up as soon as you select the Virtual Machine Swapfile Location settings under the Configuration tab for your host. Once you click Close, you then see Swapfile Location: as Getting Data… for an infinite period of time, and the Edit… option becomes greyed out and cannot be selected.

The same error occurred on both an ESX and ESXi host in the came cluster, both using the latest vSphere 4.1 build 582267. I am going to assume this can appear on older versions too.

The object has already been deleted or has not been completely created

Call "PropertyCollector.RetrieveContents" for object "propertyCollector" on vCenter Server "<servername>" failed.

You can see the error in the following screenshot:

Call "PropertyCollector.RetrieveContents" for object "propertyCollector" on vCenter Server "<servername>" failed.

This seems to occur because the host does not have any record, even a default, for the snapshot location. This only affected half the hosts in my cluster, where the other half were showing their defaults just fine.

The fix for this is very simple. I’m sure it could be implemented by multiple methods, but I used PowerCLI. Simply:

  1. Connect to the faulty host, e.g.:
    Connect-VIServer <servername / ip>
  2. Validate that you can see your preferred datastore from that host:
    Get-Datastore
  3. Manually set the datastore to your preferred DS:
    Set-VMHost -VMSwapfileDatastore <datastorename>
  4. Go back to vCenter and you will find the new value reflected, and you can now edit the Virtual Machine Swapfile Location settings under the Configuration tab for your host:

If you have multiple hosts with the same issue, or indeed when simply making swapfile location changes across your cluster, you could of course script the above.

I’m not sure whether this applies to vSphere 5 as I have not come across it there to date.

Related posts you might enjoy!

2 comments

  1. Chandrakandh says:

    I have faced this issue in vSphere 5. I have removed the host from the inventory and added again, it resolved the issue.

%d bloggers like this: