Enter Maintenance Mode operation
The Enter Maintenance Mode operation enables you to put the specified host in the maintenance mode. If you are executing this operation and the host is in maintenance mode, you cannot power on virtual machines or perform provisioning operations on the host. After the operation completes, it is safe to turn off a host without disrupting any virtual machines.
The operation completes if there are no powered-on virtual machines on the host and no provisioning operations are in progress on the host. The operation does not directly initiate any operations to evacuate or power-down virtual machines. However, if the host is part of a cluster with VMware DRS enabled, DRS provides migration recommendations to evacuate the virtual machines. If DRS is in fully-automatic mode, the migrations are automatically scheduled.
If the <status> response element contains success, the <Task> response element contains the ID of the queued task, which you can use to obtain the task status.
The following table describes the elements for the adapter request.
Adapter request elements for the Enter Maintenance Mode operation
Element | Definition | Required |
---|---|---|
<operation-type> | Defines the type of operation: Host | Yes |
<operation-name> | Defines the name of operation: Enter_Maintenance_Mode | Yes |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | No |
<password> | Specifies the password corresponding to <user-name> | Conditional; required if <user-name> is specified |
<parameters> | Contains the elements required to execute the operation | Yes |
<host-system> | Specifies the DNS name for the host that you want to put into the maintenance mode | Yes |
<timeout> | The operation completes when the host successfully enters maintenance mode or the timeout expires. If the timeout expires, the task contains a timeout fault. | Yes |
The following code sample shows the sample adapter request for the Enter Maintenance Mode operation.
Sample adapter request for the Enter Maintenance Mode operation
<operation-type>Host</operation-type>
<operation-name>Enter_Maintenance_Mode</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters>
<host-system>xyz.bmc.com</host-system>
<timeout>0</timeout>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Enter Maintenance Mode operation.
Sample adapter response for the Enter Maintenance Mode operation
<metadata>
<status>success</status>
</metadata>
<EnterMaintenanceMode_TaskResponse>
<Task>task-7983</Task>
</EnterMaintenanceMode_TaskResponse>
</vmware-infrastructure-response>
The following table shows the response element for the Enter Maintenance Mode operation.
Adapter response element for the Enter Maintenance Mode operation
Element | Definition |
---|---|
<Task> | Specifies the task ID of the submitted task |