> Documentation index for agents: /hcp/3.3/en/llms.txt

# Put a node into maintenance mode

Maintenance mode frees a node before maintenance work: hardware replacement, a node OS update, a reboot. Center automatically moves the running virtual machines (VMs) to other nodes, the disks of these VMs to pools of other nodes, then the pools of the node, and disables the node in the cluster. While the node is in maintenance, VMs do not start on it and are not moved to it. After the work, the node is taken out of maintenance and, if necessary, its VMs, disks and pools are returned to it.

## Before you begin

- You need the **Maintain Cluster Node** privilege. By default, only the **Cluster master** role has it. The maintenance progress is also available to roles with the **View Cluster Status Map (full)** or **View Cluster Status Map (dashboard)** privilege, without the list of objects.
- Only one node can be in maintenance at a time. The other nodes of the cluster must be online and enabled, and all pools that have a node must be healthy.
- The cluster must have failover tolerance: at N+0, entering is refused — [Memory reserve for node failures](/hcp/3.3/en/mechanics/failover-reserve/index.md).
- VMs are moved off the node by DRS. If DRS is off in the cluster, VMs are not moved off the node automatically — [DRS](/hcp/3.3/en/cluster/drs/index.md).
- Pick a maintenance window: if the node runs the cluster leader or the Center VM pool, entering briefly interrupts the API or the web interface — see step 2.

## 1. Check what will be moved off the node

1. In the left menu, select **Provider Data Center** → the cluster name → **Server Nodes** and click the node ID.

2. Click **Actions** to the right of the node name → **Enter Maintenance Mode**. The **Entering Maintenance Mode: \<node name>** panel opens on the right with the precheck. The precheck changes nothing.

3. Review the **VMs** section. For each VM, it shows what will happen to it:

   | Text | What it means |
   | - | - |
   | **Will migrate to \<node>** | the running VM is moved by live migration, without stopping. If its disks are on a pool of this node, they are moved to a pool of another node |
   | **Disks will move to pool \<pool>** | the VM runs on another node, and its disks are on a pool of this node: they are moved without stopping the VM |
   | **Powered off, moves with its pool** | the powered-off VM stays on its pool, the pool moves to another node |
   | **Suspended, moves with its pool** | the same for a suspended VM |
   | the "!" icon and a reason | the VM will not be moved automatically — [If a VM is not moved automatically](#vm-blocked) |

4. Review the **Pools** section: where each pool of the node moves. **Chosen by the cluster** is shown for the Center VM pool: the cluster itself moves it after the node is disabled. **No redundancy during the works** means the pool has a disk on this node, and while the node is down, the pool works without one disk.

5. Read the warnings above the sections:

   - **\<N> VMs will not move. The task will wait until you resolve them** — entering starts, but the node is not disabled until you resolve these VMs;
   - **After this node enters maintenance mode, the cluster will not have enough capacity to restart VMs if another node fails** — while the node is in maintenance, the cluster may not handle a failure of another node without losses;
   - **Pool \<pool> is above the provisioning threshold. Disks will be moved anyway.** — there is no suitable pool below the threshold, so the disks are moved to this pool; no confirmation is required.

If the **Enter Maintenance Mode** button is inactive, the node cannot enter maintenance. The button tooltip shows the reason:

- **Another node is in maintenance mode or offline: \<node>. Taking a second node down would stop the pools**;
- **Pool \<pool> is not healthy**;
- **There is no other online node in the cluster**;
- **The cluster has no failover tolerance (N+0)**.

## 2. Put the node into maintenance mode

1. If there is the warning **This node is the cluster leader. The cluster API will be unavailable for up to 12 seconds when it restarts** or **The Center VM pool is on this node. Center will restart for a few minutes when the pool moves** above the sections, select **I understand**.
2. Click **Enter Maintenance Mode**.

Center repeats the precheck: if another node has entered maintenance or a pool has become unhealthy in the meantime, Center refuses entering, and the panel shows the new precheck. If entering is accepted, the **Node \<name> is entering maintenance mode** notification appears, the **Maintenance Mode: \<node name>** panel opens on the right, and **Entering maintenance** appears next to the **Actions** button.

## 3. Follow the progress

Entering goes in stages:

1. **VMs and disks.** The moves are prepared by DRS — these are recommendations with the **Host maintenance** reason. At the **Fully Automated** automation level, Center performs them automatically. At other levels, they wait for confirmation on the **Awaiting Confirmation** tab: click **Apply** for each. The level is determined for each VM separately, taking the VM and VDC overrides into account — [DRS](/hcp/3.3/en/cluster/drs/index.md).
2. **Pools.** When no running VMs are left on a pool of the node, Center moves the pool to the node from the precheck: powered-off and suspended VMs of the pool are moved with it. A pool with a running backup or image import waits for them to finish.
3. **Disabling the node.** When no running VMs and no pools except the Center VM pool are left on the node, Center disables the node in the cluster. After that, the cluster itself moves the Center VM pool, and the web interface is unavailable for a few minutes.
4. **Done.** When no pools are left on the node, the node is in maintenance: in the **Server Nodes** table, the **Maintenance** column shows **In Maintenance Mode**, and the same mark is next to the node name.

A VM with a running live disk transfer or live migration counts as running: its pool is not moved until the transfer ends. A powered-off VM in a cold disk transfer is moved together with the pool.

While the node enters or exits maintenance, you can open the progress with **Actions** → **Maintenance Progress**. The panel has three tabs:

- **Maintenance Progress** — all objects of the entering: VMs, their **Disks** and pools, with **Description** and **State**: **Queued**, **Running**, **Done**, **Skipped**, **Blocked**, **Awaiting Confirmation**. Below, under **In Progress**, are the actions that run automatically: migrations, disk transfers, waiting for a pool backup;
- **Action Required** — VMs that will not be moved automatically and errors that require administrator action;
- **Awaiting Confirmation** — DRS recommendations waiting for **Apply**.

Entering can be cancelled: **Cancel Entering** at the bottom of the panel. Cancelling is terminating the **Entering Maintenance Mode** task — [Tasks](/hcp/3.3/en/observability/operations/index.md). Center finishes a started pool move up to the pool start — on the new node or on the old one. If the node is already disabled, Center enables it again. VMs and disks that have already been moved stay in their new places.

### If a VM is not moved automatically

A VM that cannot be moved automatically is listed on the **Action Required** tab with a reason. The node is not disabled while such VMs run on it. Each such VM has **Actions**: **Power Off** — the VM stays on its pool and is moved with it; **Migrate…** — move it manually — [Move a running VM to another node](/hcp/3.3/en/vms/migrate-vm-to-node/index.md).

| Reason | What to do |
| - | - |
| **No node has enough free memory** | free memory on other nodes or power off the VM |
| **No node with a compatible CPU** | power off the VM |
| **No other pool has this VM's image** | the disks cannot be moved: power off the VM |
| **The VM is a clone of another VM, its disks cannot be moved live** | power off the VM |
| **Service VMs cannot be migrated live** | power off the VM |
| **No pool has enough space for the VM's disks** | all suitable pools would be filled up to the limit after the move: free up space or power off the VM |
| **Live storage migration is disabled in the cluster** | power off the VM: its disks are moved with the pool |
| **DRS is disabled for this VM**, **DRS is disabled in the cluster** | move the VM manually or enable DRS — [DRS](/hcp/3.3/en/cluster/drs/index.md) |
| **Placement rule \<rule> allows no other node** | change the rule or move the VM manually |
| **No free migration slot or port on the source or target node.** | the transfer failed to get a free slot twice: repeat the migration later or power off the VM |
| **Disk copy cannot keep up with the VM's writes. Power off the VM to move its disks without live copy.** | power off the VM |

A VM is also added to this list after a transfer terminated by a user or after two failed transfers in a row: the reason is based on the error code of the transfer or, if there is no code, on the error text. A disk transfer that did not get a free transfer port is not counted as a failure: the next DRS pass repeats it.

## 4. Service the node

A node in maintenance is disabled in the cluster and has no pools or running VMs. You can reboot or power it off: this does not count as a failure, and the **Node failure recovery** task does not open. While the node is down, pools that have its disk have one disk less — do not power off the next node until the pools have recovered — [Storage redundancy and disk recovery](/hcp/3.3/en/mechanics/storage-redundancy/index.md).

The node cannot be enabled in the cluster bypassing maintenance mode: Center refuses to enable it and suggests taking the node out of maintenance.

## 5. Take the node out of maintenance

1. Open the node page and click **Actions** → **Exit Maintenance Mode**.
2. In the **Exit Maintenance Mode** window, select **Return VMs and pools** if the load must return to the node. By default, it stays in the new places.
3. Click **Exit**.

Center enables the node in the cluster. If **Return VMs and pools** is selected, Center then makes one attempt to return everything it moved when entering: first the pools, then the VMs by live migration, then the VM disks to pools of the node. Objects that are no longer where they were moved to are skipped: a deleted VM, a VM that the administrator moved elsewhere, a pool with running VMs or one that is not running. A VM that runs on the node of its pool and keeps a disk on a local volume is first moved by live migration to the node being taken out and stays there, then its disks are returned. The results are shown in **Maintenance Progress**; the exit task closes after the last return.

If the node is offline, the window shows the warning **Node \<name> is offline. Maintenance mode will be cleared; the node stays disabled in the cluster**. The maintenance mark is cleared immediately, and no objects are returned.

## Check the result

- After entering: in the **Server Nodes** table, the node has **In Maintenance Mode** in **Maintenance**; on the cluster **Resources** tab, the node row has no pools.
- After exiting: **Maintenance** shows **—**, the node **Health** is **OK**. If **Return VMs and pools** was selected, the pools and VMs are back on the node, except the skipped ones: the skip reasons are in **Maintenance Progress**.

## Limitations

- **One node at a time.** A second node cannot enter while the first one is in maintenance, entering it or exiting it.
- **Pools must be healthy.** While any running pool is not in the `ONLINE` state — for example, it still works without a disk of the previous node — entering is refused: **Pool \<pool> is not healthy**. Put the next node into maintenance when the pools have recovered.
- **Failover tolerance is required.** At N+0, entering is refused — [Memory reserve for node failures](/hcp/3.3/en/mechanics/failover-reserve/index.md). While the node is in maintenance, it counts as unavailable: the cluster failover tolerance drops by one node.
- **VMs are moved by DRS.** Without DRS or with the VM level **Disabled**, VMs wait for administrator action.
- **Power off VMs with several disks on this node's pool** before entering maintenance: live migration of their disks may not complete — [VM disk migration](/hcp/3.3/en/mechanics/disk-migration/index.md).
- **The Center VM pool** is moved by the cluster, not by Center: during that time, the web interface and the API are unavailable — [Management VM failure](/hcp/3.3/en/mechanics/management-vm-failover/index.md).

## What not to do

- **Do not reboot the node while entering runs.** Until the node is disabled, VMs and pools still run on it — for the cluster, this is a failure.
- **Do not move the node pools manually while entering runs:** Center moves them.

## Next

- [View a node: hardware, disks, performance](/hcp/3.3/en/cluster/view-node/index.md)
- [Replace a disk](/hcp/3.3/en/guides/replace-disk/index.md)
- [Planned reboot and return of a node](/hcp/3.3/en/mechanics/node-reboot-return/index.md)
- [DRS](/hcp/3.3/en/cluster/drs/index.md)

API methods: `node-maintenance-precheck`, `node-maintenance-enter`, `node-maintenance-get`, `node-maintenance-exit` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
