大家早
我目前正在尝试在 vSphere ESX 5.1.0 管理程序内设置嵌套 CentOS 7.0 KVM 主机。我一直在关注http://virtuallyhyper.com/2012/07/installing-kvm-as-a-virtual-machine-on-esxi5-with-bridged-networking/
我已成功安装 KVM 主机,并将其配置为支持 KVM 和 libvirt。
然而,当我尝试针对现有 DHCP 服务器 pxeboot KVM Guest 时,问题就出现了。
我可以看到 iPxe 发出 DHCPDISCOVER,并且 DHCP 服务器记录 DHCPOFFER,但它从未从 kvm-guest 上的 iPxe 收到 DHCPREQUEST。
我已经使用桥接网络设置了 KVM 主机,并禁用了“默认”NAT 网络:
[root@kvm-test ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.005056970ea0 yes ens160
vnet0
[root@kvm-test ~]# ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.18.51 netmask 255.255.255.0 broadcast 192.168.18.255
inet6 fe80::250:56ff:fe97:ea0 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:97:0e:a0 txqueuelen 0 (Ethernet)
RX packets 105230 bytes 13897310 (13.2 MiB)
RX errors 0 dropped 11 overruns 0 frame 0
TX packets 105566 bytes 44412894 (42.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::250:56ff:fe97:ea0 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:97:0e:a0 txqueuelen 1000 (Ethernet)
RX packets 105378 bytes 15365254 (14.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 106773 bytes 44491366 (42.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 217153 bytes 54126840 (51.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 217153 bytes 54126840 (51.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc54:ff:fec1:978 prefixlen 64 scopeid 0x20<link>
ether fe:54:00:c1:09:78 txqueuelen 500 (Ethernet)
RX packets 40 bytes 17480 (17.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 743 bytes 48921 (47.7 KiB)
TX errors 0 dropped 755 overruns 0 carrier 0 collisions 0
来宾配置了“桥接”接口:
[root@kvm-test ~]# virsh edit 2
<domain type='kvm'>
<name>kvm-guest.test.card.co.uk</name>
<uuid>82c15c03-aec5-4dd9-ad23-67275f742c89</uuid>
...
<devices>
<interface type='bridge'>
<mac address='52:54:00:c1:09:78'/>
<source bridge='br0'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
</domain>
KVM 主机上禁用了 iptables,并且没有运行本地 dhcp 服务器。
关于问题可能是什么的任何想法吗?
干杯
加文
答案1
我遇到了同样的问题,我通过输入以下命令解决了它:
brctl setageing 'bridgename' 0
。你的桥的名字出现在哪里'bridgename'
。
要使其在重新启动后保持不变,可以在文件末尾添加此命令/etc/rc.local
。
Br。