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]:
- The version number of the libvirt build, or SHA1 of the GIT commit
- virsh --version -> 3.0.0
- ii gir1.2-libvirt-glib-1.0:amd64 1.0.0-1 amd64 GObject introspection files for the libvirt-glib library
ii libvirt-clients 3.0.0-4+deb9u1 amd64 Programs for the libvirt library
ii libvirt-daemon 3.0.0-4+deb9u1 amd64 Virtualization daemon
ii libvirt-daemon-system 3.0.0-4+deb9u1 amd64 Libvirt daemon configuration files
ii libvirt-glib-1.0-0:amd64 1.0.0-1 amd64 libvirt GLib and GObject mapping library
ii libvirt0 3.0.0-4+deb9u1 amd64 library for interfacing with different virtualization systems
ii python-libvirt 3.0.0-2 amd64 libvirt Python bindings
ii qemu-kvm 1:2.8+dfsg-6+deb9u3 amd64 QEMU Full virtualization on x86 hardware
ii virt-manager 1:1.4.0-5 all desktop application for managing virtual machines
ii virtinst 1:1.4.0-5 all Programs to create and clone virtual machines
- The hardware architecture being used
- The name of the hypervisor (Xen, QEMU, KVM)
- The XML config of the guest domain if relevant
- <interface type='direct'>
<mac address='00:aa:bb:cc:dd:ee'/>
<source dev='enp1s0' mode='passthrough'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
- For QEMU/KVM, the domain logfile from /var/log/libvirt/qemu
[1] https://libvirt.org/bugs.html#quality
[2] https://libvirt.org/formatdomain.html#elementLink