Host maintenance mode

Before you perform maintenance activities on a host such as updating the operating system or firmware or replacing hardware, you should move the host into maintenance mode. Maintenance mode is sometimes referred to as one click evacuation.

Before putting a host in maintenance mode, the following must be true:
  • The host's hypervisor state must be operating. If it is not, virtual machine migrations might fail.
  • If the request was made to migrate active or all virtual machines (including virtual machines in shut off state) when entering maintenance mode, the following must also be true:
    • The hypervisor must be licensed for live partition mobility for active virtual machines.
    • The virtual machines on the host cannot be in the error, paused, or building states.
    • On all active virtual machines, the health must be OK and the RMC connections must be active.
    • All requirements for live migration must be met. See the Migration requirements topic for details.
  • If the request was made to migrate active or all virtual machines (including virtual machines in shut off state) when entering maintenance mode, the following cannot also be true, or the request will fail:
    • There is a virtual machine on the host that is a member of a collocation rule that specifies affinity and has multiple members.
    • The collocation rule has a member that is already undergoing a migration or is being remote restarted.
The following process describes what happens when you move a host into maintenance mode:
  • Based on the request, the virtual machines on the host are migrated to a different host. If there are any errors during migration, the maintenance operation fails and enters the error state until an administrator resolves the problem. By default, PowerVC migrates the virtual machines that are allocated the most memory first. In a case where two virtual machines have the same memory, then PowerVC checks for the Availability Priority setting. For example, a virtual machine that has the priority set to 100 is remote restarted before restarting a virtual machine with the priority value set to 20.
    Note: If an error is encountered during the first migration attempt, PowerVC tries to migrate the virtual machines two more times, as necessary. If the migration fails in all three attempts, the host's maintenance mode moves to error state.
  • After maintenance mode is requested, you cannot perform any actions on the host's virtual machines except stop, delete, or live migrate, and you cannot deploy or migrate virtual machines to the host. Therefore, this host is not listed in the PowerVC user interface selection lists for any actions. You can perform maintenance activities on the host.
  • When a host is ready for use, exit the maintenance mode from the PowerVC user interface. When the host is available in PowerVC again, you must manually move virtual machines to the host. The virtual machines that were previously on this host are not automatically moved back to this host.

Host maintenance mode options

Table 1. Host maintenance API mode options
Method URI Description

PUT

/v2.1/{tenant_id}/ego/prs/hypervisor_maintenance/{hypervisor_hostname}

Enables or disables host maintenance mode for the respective hypervisor host name.

Response Codes
  • Normal Response Code: 200
  • Error Response Codes:
    • Bad Request (400)
    • Not Found (404)

Request Body:

Table 2. Host maintenance mode API request body parameters
Name In Type Description

status

body

string

Required: Enable or disable maintenance mode. Values are enable or disable.

migrate

body

string

Optional: Applicable only when enabling maintenance mode. If unspecified, no migrations will occur. Specify active-only if you want active virtual machines to be migrated off the host. Specify all if you want all virtual machines to be migrated from the host. This includes virtual machines in shut off state.

When active-only is specified, existing active virtual machines are automatically relocated to other hosts within the relocation domain.

When all is specified, existing virtual machines which are in active and shut off states are automatically relocated to other hosts within the relocation domain.

While the virtual machines are being migrated, maintenance mode state is entering. After migration completion, the state changes to on.

Note: After maintenance mode is removed, the virtual machines are not automatically migrated back to the host.

target_host

body

string

Optional: Applicable only when enabling maintenance mode and specifying a migration action other than none. This specifies the target hypervisor to which the virtual machines will be migrated.