Skip to content

fix(v2k): stabilize libvirt cutover defaults for live migration#18

Merged
dhslove merged 2 commits intomainfrom
fix/v2k-libvirt-live-migration
Apr 10, 2026
Merged

fix(v2k): stabilize libvirt cutover defaults for live migration#18
dhslove merged 2 commits intomainfrom
fix/v2k-libvirt-live-migration

Conversation

@dhslove
Copy link
Copy Markdown
Contributor

@dhslove dhslove commented Apr 10, 2026

Summary

This PR fixes a v2k cutover issue where KVM guests created from migrated VMs could fail live migration due to unstable libvirt/QEMU default device synthesis, especially around virtio-balloon.

It also refreshes the ablestack_v2k CLI help and CLI guide so defaults and examples match the current implementation more closely.

Changes

  • make generated libvirt XML more stable for migration-sensitive defaults
  • explicitly add memballoon with autodeflate and freePageReporting
  • explicitly add virtio-serial guest agent channel
  • switch default video model from virtio to cirrus
  • stop forcing NIC link state to down in generated XML
  • add a smoke-test case that verifies --compat-profile defaults to auto even when omitted
  • refresh CLI --help output with:
    • default values for parameters that already have implementation defaults
    • command examples for each major command
    • notes for options accepted by cutover but not yet reflected in generated XML
    • fleet-style status --vm ... / --watch usage
  • refresh docs/v2k/v2k_cli_guide.md to match the updated help and current behavior

Root Cause

v2k was generating a minimal libvirt domain XML and relying on libvirt defaults for several devices. In the failing case, the resulting domain included an auto-synthesized virtio-balloon, and live migration failed while restoring its state on the destination host.

By making key devices explicit in the generated XML, the resulting guest definition becomes more predictable and more aligned with the migration-stable domain shape already validated in the environment.

Files Changed

  • lib/v2k/target_libvirt.sh
  • tests/v2k_compat_installer_runtime_smoke.sh
  • bin/ablestack_v2k.sh
  • docs/v2k/v2k_cli_guide.md

Validation

Validated in code by:

  • confirming the branch is cleanly based on upstream/main
  • adding a regression-style smoke-test path for implicit compat-profile=auto
  • reviewing generated XML logic against the working libvirt dump pattern

Environment limitation:

  • bash-based test execution was not run in this session due local shell/runtime restrictions

Notes

cutover still accepts --vcpu, --memory, --network, --bridge, and --vlan, but those values are not yet reflected by v2k_target_generate_libvirt_xml(). This PR documents that behavior clearly in help/docs rather than changing that interface implicitly.

@dhslove dhslove merged commit 3f1b8ab into main Apr 10, 2026
3 checks passed
@dhslove dhslove deleted the fix/v2k-libvirt-live-migration branch April 10, 2026 03:31
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.

1 participant