File Locations

File locations for a virtual machine are specified in the following properties:

  • VirtualMachineConfigSpec.files is a VirtualMachineFileInfo data object that allows you to specify the log directory, snapshot directory, suspend directory, and configuration file location. Most locations have a default that you can change as needed.
  • VirtualMachineConfigSpec.locationID is a 128-bit hash based on the virtual machine’s configuration file location and the UUID of the host the virtual machine is assigned to. This property is not usually set by developers; however, clearing this property by setting it to an empty string is recommended if you move the virtual machine.

If a virtual machine’s VirtualMachineCapability.swapPlacementSupported property is true for a virtual machine, you can specify a value for the VirtualMachineConfigSpec.swapPlacement property. The value must be one of the values of the VirtualMachineConfigInfoSwapPlacementType enumeration, as a string.