How to troubleshoot a macvtap network in kvm/virt-manager

http://askubuntu.com/questions/377413/how-to-troubleshoot-a-macvtap-network-in-kvm-virt-manager

I have a virtual machine running under qemu-kvm, on a 13.10 host.I am using virt-manager to define the machine, and I have added a virtual NIC, using the new macvtap driver. I have the following definition:

<interface type='direct'>
  <mac address='52:54:00:1f:dd:c4'/>
  <source dev='eth0' mode='bridge'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

On the host machine, I can see that the tap interface is created:

$ip link

5: macvtap0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 500
    link/ether 52:54:00:1f:dd:c4 brd ff:ff:ff:ff:ff:ff

$ls /dev/tap5 
/dev/tap5

But in the virtual machine, interface eth0 is unable to access the network. dhcp fails. Static configuration obviously works, but then I cannot ping anything.

I have no iptables rules, neither on the host, nor in the virtual machine.

So, how can I troubleshoot this problem ?


1 down vote accepted

I have same problem with Ubuntu 13.10, I also update to 14.04 development branch to try but still does not work.

I do not know a good way debug, for my problem, I found eth0 does not enter promiscuous mode, I can not find message like device eth0 entered promiscuous mode in dmesg output. So I force eth0 into promiscuous mode, the problem then disappears.

This is what I did:

  1. Force eth0 into promiscuous mode:sudo ifconfig eth0 promisc
  2. Use virt-manager to start the VM
  3. ifconfig -a and ping outside to see whether it works for you.

I do not know why libvirt does not put eth0 into promiscuous mode, maybe a bug of it.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值