Try to reconfigure a VM via Edit Settings or vMotion it - it will fail with the following error.
Reconfigure virtual machine <Virtual Machine Name> => The object 'vim.Datastore:datastore-#####' has already been deleted or has not been completely created
A specific datastore has been set for use as VM swap on cluster Level or on individual host level.
How to confirm what is set on cluster level:
Select Cluster > Configure > Configuration > General > Swap File Location
is set to 'Datastore specified by host'
How to confirm what is set on ESXi Level
Select ESXi > Configure > Virtual Machines > Swap File location
The datastore being referenced by the the VM's vmx file no longer exists, is no longer accessible. In this case it was removed after a PDL event.
You will see entries similar to the following in the vCenter vpxd log:
/var/log/vmware/vpxd/vpxd.log
YYYYY-MM-DD T HH:MM:SS error vpxd[1234567] [Originator@6876 sub=Default opID=#######] [VpxLRO] -- ERROR session[#####] -- CatalogSyncManager -- vim.vslm.vcenter.CatalogSyncManager.queryCatalogChange: :vim.fault.InaccessibleDatastore --> Result: --> (vim.fault.InaccessibleDatastore) { --> faultCause = (vmodl.MethodFault) null, --> faultMessage = <unset>, --> datastore = 'vim.Datastore:########-#####-####-####-############:datastore-#####', --> name = "datastore_name", --> detail = "notAccessible" --> msg = "" --> }
or
YYYYY-MM-DD T HH:MM:SS error vpxd[654321] [Originator@6876 sub=VmProv opID=######-01] Get exception while >executing action vpx.vmprov.CheckCompatibility:--> (vmodl.fault.ManagedObjectNotFound)
Set the location for VM swap to a datastore that is accessible preferably to all hosts or set it to Virtual machine directory (same directory where the VM files & logs are stored)
This setting is usually/preferably set on the cluster level as either "Datastore specified by host" or " Virtual machine directory "
Check/Edit on Cluster Level
If set at the cluster level you cannot change the setting from a host level. The 'Edit ...' button will be greyed out.
If so it should state :
Check/Edit on ESXi Level
Change the Swap File Location
Using Swap Files with vSphere