Virtual Machine Reload Virtual Machine From Path Task
Reloads the configuration for this virtual machine from a given datastore path.
This is equivalent to unregistering and registering the virtual machine from a different path. The virtual machine's hardware configuration, snapshots, guestinfo variables etc. will be replaced based on the new configuration file. Other information associated with the virtual machine object, such as events and permissions, will be preserved.
This method is only supported on vCenter Server. It can be invoked on inaccessible or orphaned virtual machines, but it cannot be invoked on powered on, connected virtual machines. Both the source virtual machine object and the destination path should be of the same type i.e. virtual machine or template. Reloading a virtual machine with a template or vice-versa is not supported.
Note: Since the API replaces the source configuration with that of the destination, if the destination configuration does not refer to a valid virtual machine, it will create an invalid virtual machine object. This API should not be invoked on fault tolerant virtual machines since doing so will leave the original virtual machine's configuration in an invalid state. It is recommended that you turn off fault tolerance before invoking this API.
Required privileges: VirtualMachine.Config.ReloadFromPath
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualMachine/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
{
"configurationPath": "string"
}
configurationPath
OK
{
"_typeName": "string",
"type": "string",
"value": "string"
}
NotSupported: if invoked on ESX server or if invoked on a virtual machine with the destination path for a template and vice-versa.
InvalidPowerState: if the virtual machine is powered on.
TaskInProgress: if the virtual machine is busy.
FileFault: if there is a problem creating or accessing the files needed for this operation.
InvalidState: if the virtual machine is busy or not ready to respond to such requests.
VmConfigFault: if the format / configuration of the virtual machine is invalid. Typically, a more specific fault is thrown such as InvalidFormat if the configuration file cannot be read, or InvalidDiskFormat if the disks cannot be read.
AlreadyExists: if the virtual machine is already registered.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}