Cluster Compute Resource Cluster Enter Maintenance Mode

Cluster Compute Resource Cluster Enter Maintenance Mode

The API takes a list of hosts in the cluster as input, and returns a list of hosts in "ClusterMaintenanceResult" that the server can successfully evacuate given the existing constraints in the cluster, such as HA, FT, Vmotion compatibility, reservations, affinity rules, etc.

The client is allowed to pass all hosts in the cluster to the API, even though all of them cannot enter maintenance mode at the same time. The list returned from the API contains the largest number of hosts that the server can evacuate simultaneously. The client can then request to enter each host in the returned list into maintenance mode. The client can specify an integer "DemandCapacityRatioTarget" option in the "option" parameter. The allowed values of the option range from 40 to 200, and the default value is 100. This option controls how much resource overcommitment the server should make in consolidating the VMs onto fewer hosts. A value of 100 means the server will keep the same amount of powered-on capacity as the current VM demands. A value less than 100 means undercommitted resources. A value greater than 100 means overcommitted resources. The hosts are recommended based on the inventory at the time of the API invocation. It is not guaranteed that the actual enter-maintenance tasks on the hosts will succeed, if the inventory changes after the API returns, or if vmotions fail due to unexpected conditions. For possible exceptions thrown by the necessary relocate operations, see MigrateVM_Task.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/ClusterComputeResource/{moId}/ClusterEnterMaintenanceMode
COPY
Path Parameters
string
moId
Required

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 ClusterComputeResource/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
ClusterEnterMaintenanceModeRequestType of type(s) application/json
Required
{
    "host": [
        {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        }
    ],
    "option": [
        {
            "_typeName": "string",
            "key": "string",
            "value": {
                "_typeName": "string"
            }
        }
    ]
}
host
Required

The array of hosts to put into maintenance mode.

Required privileges: Host.Config.Maintenance

option
Optional

An array of OptionValue options for this query. The specified options override the advanced options in ClusterDrsConfigInfo.

Authentication
This operation uses the following authentication methods.
Responses
200

A ClusterEnterMaintenanceResult object, which consists of an array of recommendations for hosts that can be evacuated and an array of faults for hosts that cannot be evacuated.

Returns ClusterEnterMaintenanceResult of type(s) application/json
This response body class contains all of the following: DataObject
{
    "_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"
            }
        }
    ],
    "fault": {
        "_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"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
recommendations
Optional

The list of recommendations for hosts that Virtual Center will be able to evacuate.

Each recommendation consists of a host maintenance action ClusterAction for a host, along with zero or more vmotions for evacuation. Application of the recommendations is not supported currently. The client will have to put the hosts into maintenance mode by calling the separate method HostSystem.EnterMaintenanceMode_Task.

fault
Optional

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.


Cluster Compute Resource Operations
POST
Cluster Compute Resource Abandon Hci Workflow
POST
Cluster Compute Resource Add Host Task
POST
Cluster Compute Resource Apply Recommendation
POST
Cluster Compute Resource Cancel Recommendation
POST
Cluster Compute Resource Cluster Enter Maintenance Mode
POST
Cluster Compute Resource Configure HCI Task
POST
Cluster Compute Resource Destroy Task
POST
Cluster Compute Resource Evc Manager
POST
Cluster Compute Resource Extend HCI Task
POST
Cluster Compute Resource Find Rules For Vm
GET
Cluster Compute Resource Get Action History
GET
Cluster Compute Resource Get Alarm Actions Enabled
GET
Cluster Compute Resource Get Available Field
GET
Cluster Compute Resource Get Config Issue
GET
Cluster Compute Resource Get Config Manager Enabled
GET
Cluster Compute Resource Get Config Status
GET
Cluster Compute Resource Get Configuration
GET
Cluster Compute Resource Get Configuration Ex
GET
Cluster Compute Resource Get Custom Value
GET
Cluster Compute Resource Get Datastore
GET
Cluster Compute Resource Get Declared Alarm State
GET
Cluster Compute Resource Get Disabled Method
GET
Cluster Compute Resource Get Drs Fault
GET
Cluster Compute Resource Get Drs Recommendation
GET
Cluster Compute Resource Get Effective Role
GET
Cluster Compute Resource Get Environment Browser
GET
Cluster Compute Resource Get Hci Config
GET
Cluster Compute Resource Get Host
GET
Cluster Compute Resource Get Lifecycle Managed
GET
Cluster Compute Resource Get Migration History
GET
Cluster Compute Resource Get Name
GET
Cluster Compute Resource Get Network
GET
Cluster Compute Resource Get Overall Status
GET
Cluster Compute Resource Get Parent
GET
Cluster Compute Resource Get Permission
GET
Cluster Compute Resource Get Recent Task
GET
Cluster Compute Resource Get Recommendation
GET
Cluster Compute Resource Get Resource Pool
POST
Cluster Compute Resource Get Resource Usage
GET
Cluster Compute Resource Get Summary
GET
Cluster Compute Resource Get Summary Ex
POST
Cluster Compute Resource Get System V Ms Restricted Datastores
GET
Cluster Compute Resource Get Tag
GET
Cluster Compute Resource Get Triggered Alarm State
GET
Cluster Compute Resource Get Value
POST
Cluster Compute Resource Move Host Into Task
POST
Cluster Compute Resource Move Into Task
POST
Cluster Compute Resource Place Vm
POST
Cluster Compute Resource Recommend Hosts For Vm
POST
Cluster Compute Resource Reconfigure Cluster Task
POST
Cluster Compute Resource Reconfigure Compute Resource Task
POST
Cluster Compute Resource Refresh Recommendation
POST
Cluster Compute Resource Reload
POST
Cluster Compute Resource Rename Task
POST
Cluster Compute Resource Retrieve Das Advanced Runtime Info
POST
Cluster Compute Resource Set Crypto Mode
POST
Cluster Compute Resource Set Custom Value
POST
Cluster Compute Resource Stamp All Rules With Uuid Task
POST
Cluster Compute Resource Validate HCI Configuration