Datastore Datastore Enter Maintenance Mode
Puts the datastore in maintenance mode.
While this task is running and when the datastore is in maintenance mode, no virtual machines can be powered on and no provisioning operations can be performed on the datastore. Once the call completes, it is safe to remove datastore without disrupting any virtual machines.
The task completes once there are no virtual machines on the datastore and no provisioning operations in progress on the datastore. The operation does not directly initiate any operations to evacuate or power-down powered-on virtual machines. However, if the datastore is part of a storage pod with VMware Storage DRS enabled, Storage DRS provides migration recommendations to evacuate the virtual machines. If Storage DRS is in fully-automatic mode, these are automatically scheduled. The task is cancellable. This method returns a StoragePlacementResult object, which includes a Task object with which to monitor the operation, and a list of recommendations and faults generated by Storage DRS when it tries to evacuate the virtual machines on the datastore. The recommendations and faults fields are set only if the datastore is a part of a storage pod with Storage DRS enabled.
Required privileges: Datastore.Config
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 Datastore/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
OK
{
"_typeName": "string",
"recommendations": [
{
"_typeName": "string",
"key": "string",
"type": "string",
"time": "string",
"rating": 0,
"reason": "string",
"reasonText": "string",
"warningText": "string",
"warningDetails": {
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
},
"prerequisite": [
"string"
],
"action": [
{
"_typeName": "string",
"type": "string",
"target": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
],
"target": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
],
"drsFault": {
"_typeName": "string",
"reason": "string",
"faultsByVm": [
{
"_typeName": "string",
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"fault": [
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
]
}
]
},
"task": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
The list of recommendations that the client needs to approve manually.
The faults generated by DRS when it tries to make recommendations for rule enforcement, power management, etc., and indexed in a tree structure with reason for recommendations and VM to migrate (optional) as the index keys.
InvalidState: if the datastore is already in maintenance mode.
RequestCanceled: if the operation is canceled.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}