Host maintenance mode

Use maintenance mode to enable or disable a host system for maintenance.

The PowerVC driver provides an API to enable (with or without evacuation) or disable host maintenance mode.

Table 1. Overall host maintenance mode options
Method URI Description
GET /v2/{tenant-id}/os-host-maintenance-mode/{host_name} Gets the host maintenance mode of specified host name.
PUT /v2/{tenant-id}/os-host-maintenance-mode/{host_name} Enables or disables the host maintenance mode for the specified host name.

GET host maintenance mode

Table 2. GET host maintenance mode options
Method URI Description
GET /v2/{tenant-id}/os-host-maintenance-mode/{host_name} Gets the host maintenance mode of specified host name.
Request parameters:
  1. tenant-id: The tenant ID in a multi-tenancy cloud.
  2. host_name: The name of a host.
Request body:
No request body.
Response body:
{"maintenance_status": "ok"/"entering"/"on"/"error", "maintenance_migration_action":"none"/"active"/"all"}

Set host maintenance mode

Table 3. Put host maintenance mode options
Method URI Description
PUT /v2/{tenant-id}/os-host-maintenance-mode/{host_name} Enables or disables the host maintenance mode for the specified host name.
Request parameters:
  1. tenant-id: The tenant ID in a multi-tenancy cloud.
  2. host_name: The name of a host.
Request body:
Table 4. Request body options
Parameter Option Description
status enable or disable Set enable to enter the host maintenance mode. Set disable to exit the host maintenance mode. No other parameters must be set.
migrate active-only or none If you set status to enable, set migrate to active-only to migrate all active virtual machines to another host. If you set migrate to none or did not specify a value, then the virtual machines are not migrated to another host.
target_host none or #host-name Applicable only when enabling maintenance mode and specifying a migration action other than none. If specified, describes the target host to which the virtual machines are migrated.
Response body:
{"hypervisor_maintenance": {"status": "enable"/"disable", "migrate": "none"/"active", "hypervisor_hostname": "{host-name}"}}