[Bug] rolling update evacuation_failures
Hey there! ๐ Thanks for taking the time to report this bug โ we appreciate it!
Please keep in mind: PegaProx is developed and maintained entirely by volunteers in our free time. We do our best, but we can't work magic ๐ช โ please be patient, we'll get to your issue as soon as we can.
Want to help keep PegaProx alive?
- โญ Star the project โ it's free and helps a lot!
- ๐ Become a Sponsor โ helps us dedicate more time to development
- ๐ค Contributing code or docs is always welcome too!
Describe the bug
rolling update hangs at several points during update of 6 hosts - manual intervention necessary
Steps to Reproduce
- start rolling update with host reboot and vm evacuation
- at random steps during evacuation some vms fail to evacuate
- update pauses until user quits with "continue" button
Expected behavior
rolling update should run fully automated without user intervention
Environment
- PegaProx Version: 1.0 and before
- **Installation Method:**Docker
- OS: Ubuntu 24.04
- Browser: Edge Win 11 latest patchlevel
- Behind Reverse Proxy? Apache2
- UI? No idea :-)
Logs
[10:48:36] Enabling maintenance mode on xxxpve1 [10:48:36] โ Ceph (if present): noout + norebalance will be set on xxxpve1 to prevent rebalancing [10:48:37] Waiting for VM evacuation (timeout: 1800s)... [10:49:07] Evacuating: 13/25 VMs (30s) [10:49:37] Evacuating: 21/25 VMs (60s) [10:50:07] Evacuating: 21/25 VMs (90s) [10:50:37] Evacuating: 21/25 VMs (120s) [10:51:07] Evacuating: 21/25 VMs (150s) [10:51:37] Evacuating: 21/25 VMs (180s) [10:52:07] Evacuating: 21/25 VMs (210s) [10:52:27] โ ๏ธ Evacuation: 21/25 migrated, 4 failed [10:52:27] โ Failed: xxxAPXTRACT01 (VMID: 120) [10:52:27] โ Failed: xxxTKUC02 (VMID: 274) [10:52:27] โ Failed: xxxBAVEEAM03 (VMID: 264) [10:52:27] โ Failed: xxxSD01 (VMID: 229) [10:52:27] โธ PAUSED - Waiting for user action. [11:05:45] โถ Resumed (was: evacuation_failures) [11:05:46] โถ Resumed by user - continuing update on xxxpve1 [11:05:46] Installing updates on xxxpve1 [11:05:46] Waiting for update task (timeout: 900s)... [11:05:46] Update phase: init [11:05:56] Update phase: apt_dist_upgrade [11:06:36] Update phase: wait_online [11:13:06] โ Updates installed [11:13:06] Node xxxpve1 rebooting (timeout: 600s)...
this happens several times at other hosts.
Screenshots
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
The pause there is on purpose โ if a VM fails to evacuate we stop instead of rebooting the node with guests still sitting on it. So the real question is why those 4 didn't move.
Nine times out of ten it's either local-disk VMs (live-migration needs shared storage, or you tick "allow local-disk evacuation" so it migrates with --with-local-disks) or PCI/GPU passthrough, which just can't live-migrate at all. Can you check what those 4 have in common โ local storage, passthrough, anything?
Making evacuation failures auto-skippable (continue instead of pausing) is something we can look at. Support's welcome if it saves you time: https://opencollective.com/pegaprox
Cheers, Marcus
Unfortunately these vms do not have anything in common. They are on different shared LUNs (we do not have any VMs on local storage). Neither do they have PCI/GPU passthrough.
Is there anything else I can contribute? Iยดm a supporter of your great piece of software already ;).
Thinking about it more โ almost certainly a CD-ROM with an ISO mounted from local storage on those 4. A local ISO pins the VM to the node and blocks live-migration, which lines up exactly with 21 moving and 4 stuck. Eject the ISO (or park it on shared storage) and they'll evacuate fine.
So this is config rather than a bug on our side โ going to close it out, but give me a shout if ejecting the ISOs doesn't sort it.
Cheers, Marcus
Sorry, but no. one out of 4 has a cdrom attached, but nothing mounted into it. The other vms do not even have a cdrom.
Mounted ISOs to CD-ROMS were always show stoppers even in vmware days :-)
One more pointer: check the migration task in Proxmox's own task list (the failed migrate job on the source node). PVE logs exactly why it declined each of those 4 guests there โ local ISO mounted, PCI passthrough, unshared storage, that kind of thing.
If Proxmox itself refuses the live-migration, there's nothing we can force from our side: we ask PVE to migrate, PVE says no, and we deliberately stop rather than reboot a node with VMs still on it. So this sits on the environment/config side, not a PegaProx bug โ leaving it closed, but that PVE task log will tell you which of the four tripped it.
โ Nico
@MrMasterbay that is a good hint. Next time I will try to find the reason for the migration failure of certain vms.
Actually this is strange, as when I click "continue" in PegaProx the process goes on and the vms which were marked as failed ARE migrated.
I will keep this updated.
Thanks, Claudio
@MrMasterbay @mkellermann97 thanks to pending kernel updates I have started a rolling update via pegaprox again. While pegaprox complained about several vms, which could not be migrated, the host itself was completely free of vms and showed NO errors.
@cklabautermann thanks for the follow-up. What you're describing โ PegaProx flags VMs as "failed to migrate" during evacuation, but they actually end up migrated and the host drains completely clean โ points at the evacuation detection over-reporting rather than a real migration failure. The likely cause: the migrate task completes just after we sample its state, so we log it as failed while PVE quietly finishes it (which is also why "continue" then shows them migrated). That's on us to tighten.
Since you've hit it twice, it's worth tracking properly โ want me to reopen this? And if you can grab the PegaProx log around one of those false "failed" lines next time, that'd pin the exact timing window and make the fix straightforward.
โ Marcus
@mkellermann97 yes please reopen this. I will try to deliver anything you may need to fix this (actually really awesome!) feature. Please tell me exactly where I can find the PegaProx log. Or is the web based output enough? I am willing to reproduce the condition, as right now some minor updates are waiting again to be delivered :-). Kind regards, Claudio
@MrMasterbay @mkellermann97 once again today 5 of 6 cluster nodes paused their job during rolling update via pegaprox. I have been constantly looking at pegaprox log and the cluster itself, trying to see if sth. happens on the cluster at the time pegaprox pauses its job - but nothing indicates a problem on cluster side.
If you indicate what you need to look into this I would be glad to provide it. Thanks, Claudio
Since you've hit it twice, it's worth tracking properly โ want me to reopen this? And if you can grab the PegaProx log around one of those false "failed" lines next time, that'd pin the exact timing window and make the fix straightforward.
โ Marcus
2 weeks later: have been trying to have this reopened...last trial. Thanks, Claudio
You're right to chase this, Claudio โ apologies, the reopen I offered slipped through (small volunteer team, and it fell off the radar between releases; not an excuse, just the honest reason). Reopening now.
Where the PegaProx log lives depends on your install:
- systemd / manual:
journalctl -u pegaprox(or whatever you named the service), or the log file under the install dir'slogs/โ the web output is a filtered view, so the raw log is more useful here. - Docker:
docker logs <pegaprox-container>.
What would pin it: the log lines around one of those false "failed to migrate" / paused entries during a rolling update, ideally with timestamps โ so we can see the gap between when we sample the migrate task's state and when PVE actually finishes it. Catch one reproduction with that and the fix is straightforward (re-poll the task-completion state before we declare an evacuation failure).
Thanks for the patience and for offering to reproduce it โ that's exactly what'll get this fixed.
Thanks, Markus. as soon as another kernel patch appears for Proxmox I will try to collect logs according to what you wrote above. Kind regards, Claudio
Hi Markus,
journalctl -u pegaprox -f/e did the trick, now I am able to see more logs :-).
[PegaProx_pvecluster] INFO: migrating xxx64 (190) pve3 -> pve4 [PegaProx_pvecluster] ERROR: [ERROR] Failed to migrate xxx64: 500 - {"data":null,"message":"VM is locked (migrate)\n"} [PegaProx_pvecluster] ERROR: [ERROR] Failed to evacuate xxx64
I have looked at all 'failed' migrations: they all failed with the same error message. However none of them was/is locked. PegaProx paused the rolling update - the host, however is in maintenance.....
The logfile tells almost the same:
INFO: [SYNC] Evacuating XXX64 (VMID: 190) to pve4 INFO: migrating XXX64 (190) auspve3 -> pve4 ERROR: [ERROR] Failed to migrate XXX64: 500 - {"data":null,"message":"VM is locked (migrate)\n"} ERROR: [ERROR] Failed to evacuate XXX64
That log is exactly what we needed, Claudio โ thank you for grabbing it.
Now it's clear. The line that matters:
Failed to migrate XXX64: 500 - {"message":"VM is locked (migrate)"}
That lock isn't a real problem โ it's the normal lock Proxmox puts on a guest while it is migrating. So when PegaProx got that 500, a migration for that guest was already in flight: when the node enters maintenance, PVE's own HA starts relocating the HA-managed guests, and our evacuation/recheck pass then re-issues the migrate before the first one finishes โ and hits the lock. The guest was moving perfectly fine (which is exactly why you saw the host drain and go into maintenance), but PegaProx read "locked (migrate)" as a hard failure and paused the update. That's your false evacuation_failures.
Fix (on the Testing branch now): when a migrate comes back "VM is locked (migrate)", PegaProx no longer fails it outright. It waits for the in-flight move to finish and checks whether the guest actually left the source node โ if it did, the evacuation counts as successful; only a guest that genuinely never leaves is still treated as a failure. So the rolling update won't pause on that case anymore.
If you can run a Testing build next time you patch, I'd love to confirm it clears on your cluster. Either way โ thanks for the patience and for the journalctl output; that pinned it exactly.
Hi, Iยดm back with mostly good news the rolling update ran with only one hickup on 6 hosts with > 200 VMs :
Sep 09 09:24:06 pegaproxhost pegaprox[3356228]: [2026-09-09 09:24:06,856] [PegaProx_pvecluster] INFO: [SYNC] Evacuating VMXXX (VMID: 301) to pve2 Sep 09 09:24:06 pegaproxhost pegaprox[3356228]: [2026-09-09 09:24:06,871] [PegaProx_pvecluster] INFO: migrating VMXXX (301) pve3 -> pve2 Sep 09 09:24:06 pegaproxhost pegaprox[3356228]: [2026-09-09 09:24:06,904] [PegaProx_pvecluster] INFO: [OK] Migration initiated for VMXXX to pve2 (Task: UPID:pve3:000620F4:09CFA056:6AA109B6:hamigrate:301:root@pam!pegaprox_53735> Sep 09 09:24:10 pegaproxhost pegaprox[3356228]: [2026-09-09 09:24:10,957] [PegaProx_pvecluster] WARNING: Task UPID:pve3:000620F4:09CFA056:6AA109B6:hamigrate:301:root@pam!pegaprox_537354: finished with exit status: command 'ha-manager m> Sep 09 09:24:10 pegaproxhost pegaprox[3356228]: [2026-09-09 09:24:10,990] [PegaProx_pvecluster] ERROR: [ERROR] Migration task failed for VMXXX Sep 09 09:24:10 pegaproxhost pegaprox[3356228]: [2026-09-09 09:24:10,990] [PegaProx_pvecluster] ERROR: [ERROR] Failed to evacuate VMXXX
As usual the VM was migrated and the host in maintenance mode at that time.
In the past this occurred in ~ 3 out of 6 hosts with ~4-5 VMs/host.
That log had the answer in it โ thanks for grabbing the timestamps, they're what made it obvious.
Migration initiated at 09:24:06.904, task reported failure at 09:24:10.957. Four seconds. ha-manager migrate returns as soon as the CRM has taken the request, not once the guest has actually moved, so at that point your VM genuinely was still on pve3 โ it just hadn't started yet.
We already had a check for this ("task failed, but did it move anyway?"). It ran the instant the task came back, which is too early to mean anything, so it saw the guest on its source node and called the evacuation failed. Then the CRM finished the job and everything was fine, which is exactly what you kept observing.
Now it keeps asking for 90 seconds instead of looking once, and takes the first answer that puts the guest elsewhere. Both the window and the poll interval are settings (PEGAPROX_HA_MIGRATE_SETTLE, PEGAPROX_HA_MIGRATE_SETTLE_POLL) in case your CRM wants longer. A VM that really doesn't move still fails โ it just takes the extra wait to say so, and that's the rare case.
On Testing, comes with the next release. Going from 3-of-6 hosts down to 1 suggests the earlier rounds helped too; this should take the last one.
Marcus ยท https://opencollective.com/pegaprox if it's worth a round
1.2.0 is out and this is in it.
The four-second window your log showed is gone โ we no longer judge an HA migration by whether the guest has moved yet, because ha-manager migrate returns as soon as the CRM accepts the request, not when the VM lands. Six hosts and 200+ VMs was a genuinely useful test case, so thanks for sticking with it through all seventeen comments.
Shout if it turns up again and I'll reopen.
Marcus
(unrelated, but if PegaProx saves you time: https://opencollective.com/pegaprox keeps the lights on)
Hi @mkellermann97 ,
Thanks for the patch. However:
`Sep 21 11:18:50 lx78 pegaprox[1017]: [2026-09-21 11:18:50,964] [PegaProx_pvecluster] INFO: [SYNC] Evacuating PBS01 (VMID: 294) to pve1 Sep 21 11:18:50 lx78 pegaprox[1017]: [2026-09-21 11:18:50,979] [PegaProx_pvecluster] INFO: migrating PBS01 (294) pve5 -> pve1 Sep 21 11:18:51 lx78 pegaprox[1017]: [2026-09-21 11:18:51,000] [PegaProx_pvecluster] INFO: [MAINT] PBS01 (294) already holds a migrate lock โ a migration is in flight; waiting for it to finish instead of failing the evacuation. Sep 21 11:20:02 lx78 pegaprox[1017]: [2026-09-21 11:20:02,184] [PegaProx_pvecluster] WARNING: [MAINT] PBS01 (294) migrate lock cleared but it is still on pve5; the in-flight migration did not relocate it. Sep 21 11:20:02 lx78 pegaprox[1017]: [2026-09-21 11:20:02,184] [PegaProx_pvecluster] ERROR: [ERROR] Failed to migrate PBS01: 500 - {"data":null,"message":"VM is locked (migrate)\n"} Sep 21 11:20:02 lx78 pegaprox[1017]: [2026-09-21 11:20:02,184] [PegaProx_pvecluster] ERROR: [ERROR] Failed to evacuate PBS01
Sep 21 11:20:06 lx78 pegaprox[1017]: [2026-09-21 11:20:06,518] [PegaProx_pvecluster] INFO: migrating xxx40 (303) pve5 -> pve1 Sep 21 11:20:06 lx78 pegaprox[1017]: [2026-09-21 11:20:06,549] [PegaProx_pvecluster] INFO: [OK] Migration initiated for xxx40 to pve1 (Task: UPID:pve5:0000B54C:0215A432:6AB0F6C9:hamigrate:303:root@pam!pegaprox_537354:) Sep 21 11:20:08 lx78 pegaprox[1017]: [2026-09-21 11:20:08,584] [PegaProx_pvecluster] WARNING: Task UPID:pve5:0000B54C:0215A432:6AB0F6C9:hamigrate:303:root@pam!pegaprox_537354: finished with exit status: command 'ha-manager migr> Sep 21 11:21:39 lx78 pegaprox[1017]: [2026-09-21 11:21:39,500] [PegaProx_pvecluster] ERROR: [ERROR] Migration task failed for xxx40 Sep 21 11:21:39 lx78 pegaprox[1017]: [2026-09-21 11:21:39,500] [PegaProx_pvecluster] ERROR: [ERROR] Failed to evacuate xxx40`
This were 2 VMs which pegaprox assumed to have failed migration. This rolling update was performed without host reboot as there was no kernel update included.
Thanks for reopening and kind regards, Claudio
Hi Claudio,
You are right and I closed this too early โ sorry. What you hit is not the failure the patch addressed, so the fix is fine and incomplete at the same time.
Two different things in that log, and neither is the premature-judgement race from September:
294 โ our own line and Proxmox contradict each other inside the same millisecond. At 11:20:02,184 we report the migrate lock as cleared, and the very next call comes back VM is locked (migrate). We read the lock off status/current and treat "no lock + still on source" as a finished-but-failed move. For an HA guest that inference is too eager: the CRM sets and clears that lock as it works, so a point sample can land in a gap and we call it a failure while the move is still queued.
303 is a third case again โ there the ha-manager migrate task itself exited non-zero, which is a real failure signal, not us misreading one. Both UPIDs say hamigrate, so both guests are HA-managed and neither went through the plain migrate path.
The one thing I can not see: your paste truncates the task error at command ha-manager migr>. That line is the whole answer for 303. Could you grab the full one โ pvesh get /nodes/pve5/tasks/<UPID>/log, or just the task in the PVE UI?
For 294 I want to stop trusting the guest lock for HA guests and ask ha-manager what it thinks instead. That is the part I would rather get right than quick.
Marcus