[KVM] VM live migration with attached NIC issue

#1

Hi there,

Server and nodes are hosted at the CentOS Linux release 7.6.1810 (Core).

$ uname -r
3.10.0-957.10.1.el7.x86_64

When I start VM live migration the bridge interface has entered into the disabled state.
Please find some console outputs/logs.
Before migration:

[sadm@one-kvm-node-02 ~]$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0025902dd6fc no eno1
br1 8000.0025902dd6fd no eno2
one-20-0

After starting the migration:

[sadm@one-kvm-node-02 ~]$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0025902dd6fc no eno1

journalctl shows the following messages:

Mar 20 10:25:40 one-kvm-node-02.tsu kernel: device eno2 left promiscuous mode
Mar 20 10:25:40 one-kvm-node-02.tsu kernel: br1: port 1(eno2) entered disabled state

VM log:

Wed Mar 20 10:25:34 2019 [Z0][VM][I]: New LCM state is MIGRATE
Wed Mar 20 10:25:34 2019 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_premigrate.
Wed Mar 20 10:25:35 2019 [Z0][VMM][I]: ExitCode: 0
Wed Mar 20 10:25:35 2019 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Wed Mar 20 10:25:40 2019 [Z0][VMM][I]: ExitCode: 0
Wed Mar 20 10:25:40 2019 [Z0][VMM][I]: Successfully execute virtualization driver operation: migrate.

VM has stucked in the MIGRATE status.
To solve this issue I’ve restarted network service:

[sadm@one-kvm-node-02 ~]$ sudo systemctl restart network

And migration process has successfully finished:
VM log:

Wed Mar 20 10:33:10 2019 [Z0][VMM][I]: clean: Executed “sudo ip link delete br1”.
Wed Mar 20 10:33:10 2019 [Z0][VMM][I]: ExitCode: 0
Wed Mar 20 10:33:10 2019 [Z0][VMM][I]: Successfully execute network driver operation: clean.
Wed Mar 20 10:33:10 2019 [Z0][VMM][I]: ExitCode: 0
Wed Mar 20 10:33:10 2019 [Z0][VMM][I]: Successfully execute network driver operation: post.
Wed Mar 20 10:33:10 2019 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_postmigrate.
Wed Mar 20 10:33:10 2019 [Z0][VM][I]: New LCM state is RUNNING

Node’s outputs:

[sadm@one-kvm-node-02 ~]$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0025902dd6fc no eno1
br1 8000.0025902dd6fd no eno2

[sadm@one-kvm-node-01 ~]$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.ac162db72720 no eno1
br1 8000.ac162db72721 no eno2
one-20-0

Could you assist is there a VM migration method without restarting the network service?

brg,
Serhiy.

#2

Solution or workaround:
Edit /var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf to

# Don't delete bridge with no virtual interfaces left
#:keep_empty_bridge: false
:keep_empty_bridge: true