Cloud Native 5 min read

Optimizing Live Migration in Kube-OVN without Modifying KubeVirt Source Code

This article explains how Kube-OVN leverages OVN configuration parameters to enable non‑intrusive live migration for KubeVirt virtual machines, describes the underlying principle, provides usage instructions, and presents test results showing a drastic reduction in packet loss and migration downtime.

Cloud Native Technology Community
Cloud Native Technology Community
Cloud Native Technology Community
Optimizing Live Migration in Kube-OVN without Modifying KubeVirt Source Code

Background In the existing architecture that integrates Kube-OVN with KubeVirt, live migration of virtual machines usually requires modifying KubeVirt source code, increasing integration complexity. To simplify the process and reduce network interruption during migration, this optimization adjusts Kube-OVN logic to support live migration without changing KubeVirt source.

Live Migration Interruption Optimization Principle

OVN Optimization Parameters According to the OVSCon 2022 documentation, OVN provides two key configuration items to improve network stability during VM live migration:

1. requested-chassis – Allows specifying multiple chassis for a logical port.

2. activation-strategy – When multiple chassis are configured in requested-chassis , an activation strategy can be set. If set to "rarp", the port blocks all inbound and outbound traffic until it receives a RARP packet from libvirt, after which the new chassis is activated and traffic resumes.

These settings prevent port binding conflicts in multi‑chassis environments and optimize traffic switching and connectivity during migration.

Kube-OVN Optimization Previously, Kube-OVN required modifying KubeVirt source code and using specific annotations to obtain migration status. The new optimization makes Kube-OVN listen to the KubeVirt CRD VirtualMachineInstanceMigration , dynamically fetch migration status, and automatically adjust OVN's requested-chassis and activation-strategy configurations, achieving a non‑intrusive migration improvement.

Usage To enable the live migration optimization, add the argument --enable-live-migration-optimize=true to the kube-ovn-controller configuration.

Test Results The effect was evaluated using kube-ovn-pinger to continuously ping the VM IP during migration with a 0.01‑second interval. Results:

Before enabling optimization: 855 packet losses, approximately 8.55 seconds of interruption.

After enabling optimization: 69 packet losses, approximately 0.69 seconds of interruption.

The test demonstrates that enabling the optimization significantly reduces both network interruption time and packet loss during VM migration.

References

- OVSCon 2022: Live Migration with OVN (https://www.openvswitch.org/support/ovscon2022/slides/Live-migration-with-OVN.pdf)

Related Links

- Issue 4740 (https://github.com/kubeovn/kube-ovn/issues/4740)

- Pull Request 4773 (https://github.com/kubeovn/kube-ovn/pull/4773)

- OVN configuration reference (https://man7.org/linux/man-pages/man5/ovn-nb.5.html)

cloud nativenetwork optimizationlive migrationKubevirtKube-OVNOVN
Cloud Native Technology Community
Written by

Cloud Native Technology Community

The Cloud Native Technology Community, part of the CNBPA Cloud Native Technology Practice Alliance, focuses on evangelizing cutting‑edge cloud‑native technologies and practical implementations. It shares in‑depth content, case studies, and event/meetup information on containers, Kubernetes, DevOps, Service Mesh, and other cloud‑native tech, along with updates from the CNBPA alliance.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.