Skip to content

fix(vm): keep target PVC when migrating VM with local disks#2518

Open
loktev-d wants to merge 2 commits into
mainfrom
fix/vm/local-disk-migration-volume-revert
Open

fix(vm): keep target PVC when migrating VM with local disks#2518
loktev-d wants to merge 2 commits into
mainfrom
fix/vm/local-disk-migration-volume-revert

Conversation

@loktev-d

@loktev-d loktev-d commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

Two fixes making live migration / Evict of VMs with hotplugged local-storage disks reliable. Follow-up to #2508.

  1. vm controller: stable volume swap. The migration volume/affinity were gated on the VD Migrating condition, which is False (WaitForTargetReady) until the target PVC binds. Mid-migration the controller read that as "not migrating" and reverted the hotplug volume/affinity to the source PVC. Now gated on the stable MigrationState.
  2. vd controller: no stale target PVC. Back-to-back migrations could adopt a previous migration's still-terminating PVC as the target. Now terminating non-source PVCs are filtered out, so a fresh target is created.

Why do we need it, and what problem does it solve?

VMs with local-storage hotplug disks couldn't be reliably evicted/migrated.

What is the expected result?

Repeatedly Evict a VM with a hotplug disk on a local WFC storage class - target launcher and attachment pod schedule on the target node and the migration completes; no Unschedulable, no WaitForTargetReady stall.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: fix
summary: keep target PVC when migrating VM with local disks

Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants