Hello,
I'm trying to automatically pass interface status changes (e.g. LAN cable connection/disconnection, ) to a QEMU Debian virt, but the status in the virt is always 'up' (i.e. 'virsh domif-getlink 3 macvtap0' == up).
I'v tried setting 'virsh domif-setlink 3 macvtap1 up' or down, which works (i.e. domif-getlink==down). But I want that state to be automatically propagated to the virt.
The only thing I found after hours of searching was "Default behavior if [..] unspecified is to have the link state up" [2].
 
Do I miss something, or is this simply not integrated??
Best, John
 
 
 
On the host this is what I observed:
------------------------------------------------------------------------------
ip link show|grep enp1s0
3: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
19: macvtap1@enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state LOWERLAYERDOWN mode DEFAULT group default qlen 500
------------------------------------------------------------------------------
virsh domiflist 3
setlocale: No such file or directory
Interface  Type       Source     Model       MAC
-----------------------------------------------------
macvtap0   direct     enp3s0     virtio      00:30:d6:19:4c:8c
macvtap1   direct     enp1s0     virtio      00:30:d6:19:2a:2d
vnet5      network    vmnet0     virtio      52:54:00:dc:14:e4
------------------------------------------------------------------------------ and
virsh domif-getlink 3 macvtap0
macvtap0 up
 
Following are stats concerning to the bug report how to [1]:
 
[1] https://libvirt.org/bugs.html#quality
[2] https://libvirt.org/formatdomain.html#elementLink