I'm using libvirt/qemu under Debian 12 and trying to set up live
migration of a vm with an SV-IOV pass-through ethernet interface
(libvirt 9.0.0 from stable and qemu 9.2.0 from backports).
The SR-IOV interface is properly removed on the sending side and
restored on the receiving side, but link on the standby virtio
interface is not enabled in between those two events.
The documentation isn't completely clear, but I assumed qemu would
automatically light up the standby interface when the physical
pass-through interface was removed, and then shut it down when it was
restored.
But that's not what I'm seeing, initially all three interfaces are present:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:a1:e0:38 brd
ff:ff:ff:ff:ff:ff altname enp8s0
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel
master eth0 state DOWN mode DEFAULT group default qlen 1000 link/ether
52:54:00:a1:e0:38 brd ff:ff:ff:ff:ff:ff altname enp8s0nsby
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master eth0
state UP mode DEFAULT group default qlen 1000 link/ether
52:54:00:a1:e0:38 brd ff:ff:ff:ff:ff:ff altname enp1s0
Then the SR-IOV interface disappears, but link on the standby interface
is still down:
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
state DOWN mode DEFAULT group default qlen 1000 link/ether
52:54:00:a1:e0:38 brd ff:ff:ff:ff:ff:ff altname enp8s0
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel
master eth0 state DOWN mode DEFAULT group default qlen 1000 link/ether
52:54:00:a1:e0:38 brd ff:ff:ff:ff:ff:ff altname enp8s0nsby
And finally the SV-IOV interface comes back:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:a1:e0:38 brd
ff:ff:ff:ff:ff:ff altname enp8s0
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel
master eth0 state DOWN mode DEFAULT group default qlen 1000 link/ether
52:54:00:a1:e0:38 brd ff:ff:ff:ff:ff:ff altname enp8s0nsby
5: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master eth0
state UP mode DEFAULT group default qlen 1000 link/ether
52:54:00:a1:e0:38 brd ff:ff:ff:ff:ff:ff altname enp1s0
This results in no network connectivity during the migration while the
SR-IOV interface is gone.
Am I supposed to explicitly do a 'virsh domif-setlink up' before 'virsh
migrate' and 'virsh domif-setlink down' after the migration to manually
manage link on the standby interface? If not, what am I missing that
would keep the link from being automatically managed?
Thanks much…