<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Hello,</div> <div>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).</div> <div>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.</div> <div>The only thing I found after hours of searching was "Default behavior if [..] unspecified is to have the link state up" [2].</div> <div> </div> <div>Do I miss something, or is this simply not integrated??</div> <div>Best, John</div> <div> </div> <div> </div> <div> </div> <div>On the host this is what I observed:</div> <div>------------------------------------------------------------------------------</div> <div><strong>ip link show|grep enp1s0</strong><br/> 3: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000<br/> 19: macvtap1@enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state LOWERLAYERDOWN mode DEFAULT group default qlen 500</div> <div>------------------------------------------------------------------------------</div> <div><strong>virsh domiflist 3</strong><br/> setlocale: No such file or directory<br/> Interface Type Source Model MAC<br/> -----------------------------------------------------<br/> macvtap0 direct enp3s0 virtio 00:30:d6:19:4c:8c<br/> macvtap1 direct enp1s0 virtio 00:30:d6:19:2a:2d<br/> vnet5 network vmnet0 virtio 52:54:00:dc:14:e4</div> <div>------------------------------------------------------------------------------ and</div> <div><strong>virsh domif-getlink 3 macvtap0</strong><br/> macvtap0 up</div> <div> </div> <div>Following are stats concerning to the bug <em>report how to</em> [1]:</div> <ul> <li>The version number of the libvirt build, or SHA1 of the GIT commit <ul> <li>virsh --version -> 3.0.0</li> <li>ii gir1.2-libvirt-glib-1.0:amd64 1.0.0-1 amd64 GObject introspection files for the libvirt-glib library<br/> ii libvirt-clients 3.0.0-4+deb9u1 amd64 Programs for the libvirt library<br/> ii libvirt-daemon 3.0.0-4+deb9u1 amd64 Virtualization daemon<br/> ii libvirt-daemon-system 3.0.0-4+deb9u1 amd64 Libvirt daemon configuration files<br/> ii libvirt-glib-1.0-0:amd64 1.0.0-1 amd64 libvirt GLib and GObject mapping library<br/> ii libvirt0 3.0.0-4+deb9u1 amd64 library for interfacing with different virtualization systems<br/> ii python-libvirt 3.0.0-2 amd64 libvirt Python bindings<br/> ii qemu-kvm 1:2.8+dfsg-6+deb9u3 amd64 QEMU Full virtualization on x86 hardware<br/> ii virt-manager 1:1.4.0-5 all desktop application for managing virtual machines<br/> ii virtinst 1:1.4.0-5 all Programs to create and clone virtual machines<br/> </li> </ul> </li> <li>The hardware architecture being used <ul> <li>x86_64</li> </ul> </li> <li>The name of the hypervisor (Xen, QEMU, KVM) <ul> <li>QEMU</li> </ul> </li> <li>The XML config of the guest domain if relevant <ul> <li> <interface type='direct'><br/> <mac address='00:aa:bb:cc:dd:ee'/><br/> <source dev='enp1s0' mode='passthrough'/><br/> <model type='virtio'/><br/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br/> </interface></li> </ul> </li> <li>For QEMU/KVM, the domain logfile from /var/log/libvirt/qemu</li> </ul> <div> </div> <div>[1] https://libvirt.org/bugs.html#quality</div> <div>[2] https://libvirt.org/formatdomain.html#elementLink</div> </div></div></body></html>