我是qemu网络的新手,对以下情况非常困惑.我推出了5个虚拟机.每个都通过分接设备连接到br0.我还有一个dnsmasq在br0上侦听DHCP.
问题是dnsmasq没有根据我指定的dhcp_host文件将ip分发给VM. dhcp_host文件的条目如下:mac:ip.我想当我把mac addr放在qemu中时,dnsmasq应该从dhcp_host文件中查找ip.但事实并非如此.相反,它随机分发ip.
现在,当我用brctl检查时.它显示10个mac地址而不是5个!?我从谷歌搜索了很多qemu网络教程,然后来这里询问.他们都没有回答我的问题.有人可以解释一下情况或给我一些指示吗?谢谢!
$brctl show
bridge name bridge id STP enabled interfaces
br0 8000.1ed7c974ed93 no tap0
tap1
tap2
tap3
tap4
$brctl showmacs br0
port no mac addr is local? ageing timer
1 02:2f:ef:29:be:36 no 1.73
1 1e:d7:c9:74:ed:93 yes 0.00
4 22:00:f4:a8:89:8a no 3.99
5 5a:e6:2a:d6:a0:50 yes 0.00
3 5e:18:64:12:3d:ec yes 0.00
3 72:22:53:51:f4:fa no 3.08
4 7a:e4:22:89:59:9a yes 0.00
5 82:9f:d3:6d:54:17 no 0.69
2 c2:fb:2a:3a:81:e9 no 32.99
2 e6:a6:7a:a4:49:d4 yes 0.00
更新:
以下是来自ps aux的一个qemu过程信息示例
user 15983 99.9 8.0 5673100 5296180 ? Sl 12:29 214:30 qemu-system-x86_64
-enable-kvm -snapshot -no-shutdown
-m 5120 -smp 2
-pidfile /home/user/vm-workingdir/instance-2/pid
-monitor unix:/home/htrc/user/instance-2/monitor,server,nowait
-serial file:/home/user/vm-workingdir/instance-2/release_mon
-usb
-net nic,vlan=0,macaddr=c2:b3:04:4b:8c:c8
-net tap,fd=3
-hda /home/user/vm-workingdir/instance-2/image.img
-vnc :105,password