#803264 libvirt-daemon: macvtap interface for a VM won't get up

Package:
libvirt-daemon
Source:
libvirt
Description:
Virtualization daemon
Submitter:
Thomas SILVESTRE
Date:
2015-10-28 18:12:22 UTC
Severity:
normal
#803264#5
Date:
2015-10-28 13:35:04 UTC
From:
To:
Dear Maintainer,

I'm using libvirt to virtualize a VM on my laptop, this vm has to be bridged on
the network and I'm using macvtap technology (trough virt-manager)

here is the xml part of the domain regarding network:
<interface type='direct'>
      <mac address='52:54:00:7f:de:65'/>
      <source dev='eth0' mode='bridge'/>
      <target dev='macvtap0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </interface>
    <interface type='network'>
      <mac address='52:54:00:49:cb:48'/>
      <source network='priv'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/>
    </interface>

When the laptop boot and I start the VM, there's no problem.
But when I put the laptop to sleep, the macvtap interface will never get up
again.

I even tried to stop the vm, libvirt, unload modules (macvtap, vhost_net,
vhost, e1000e), but nothing help.

The only way to get it back working is to reboot the host os (like Windows,
booohooo :-( )

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

I'm not sure, either unplug/plug the ethernet connection (like removing the
laptop from its docking station), or put laptop on sleep and wake him.


   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Appart a reboot, nothing effective.

   * What was the outcome of this action?
   * What outcome did you expect instead?

When the system is wokring, the macvtap interface is "UP", but when the problem
occurs the interface is "DOWN". Of course a "ip link set macvtap0 up" or delete
interface and recreate them did not help.

The only thing I founded in the log is this message:
IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready

#803264#10
Date:
2015-10-28 18:11:18 UTC
From:
To:
tags 803264 +moreinfo
thanks

Hi,

It is unlikely that this is a libvirt issue. I'd try to reproduce
without libvirt (qemu/kvm only). Please see if this happens then either.
If this still happens we can reassign to the proper component.

Also please attach your vm/network coniguration xml.
CHeers,
 -- Guido