Moving a host to 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.

Ensure that the following requirements are met before moving the host into maintenance mode:
  • 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.

Follow these steps to move a host to maintenance mode:

  1. Select the host that you want to put into maintenance mode, and select Enter Maintenance Mode.
  2. If you want to migrate the virtual machines to other hosts:
    • Select Migrate active virtual machines to another host to migrate active virtual machines.
    • Select Migrate all virtual machines to another host to migrate all virtual machines which are in Active and Shutoff states.
    The above options are unavailable if there are no hosts available for the migration. Virtual machines that are in Shutoff state can only be migrated to a similar host. For example, virtual machines on an HMC host can be migrated to another HMC host.
  3. Click OK.
    Note: You can edit the period after which the migration operation times out and the maintenance mode enters an error state by running the following commands:
    /usr/bin/powervc-config compute maintenance_migration_timeout --set <duration_in_seconds> --restart
    Where <duration_in_seconds> is the timeout period in seconds.

    For example, to set the timeout for 1 hour, run /usr/bin/powervc-config compute maintenance_migration_timeout --set 3600 --restart.

After maintenance mode is requested, the host's maintenance state is Entering while the virtual machines are migrated to another host, if requested. This status changes to On after the migration is complete and the host is fully in maintenance state.

To remove a host from maintenance mode, select the host and select Exit Maintenance Mode.

After the host is brought out of maintenance mode, you can add virtual machines to the host.

After the host exits the maintenance mode (after 5 minutes) or when the host becomes active, any pinned virtual machines that were moved from the host or if the host has 'Recall enabled' option set to Yes, PowerVC automatically recalls the virtual machines to the host.