主机和客户都在运行Fedora 26服务器版本。 主机来自OVH,客户是直接从Fedora ISO。
为了简洁起见,我已经修正了有关TXRX和回送的所有内容。
Main IP aaa17 Main IP Gateway aaa254 Failover IP bbb192 Failover MAC 20:00:00:10:5f:d7
主机ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet aaa17 netmask 255.255.255.0 broadcast aaa255 ether 70:54:d2:1a:9f:5c txqueuelen 1000 (Ethernet) device interrupt 20 memory 0xfe500000-fe520000 virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:3a:fb:f8 txqueuelen 1000 (Ethernet) vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::fc00:ff:fe10:5fd7 prefixlen 64 scopeid 0x20<link> ether fe:00:00:10:5f:d7 txqueuelen 1000 (Ethernet)
来宾ifconfig
ens3: flags=4163(UP,BROADCAST,RUNNING,MULTICAST) inet bbb192 netmask 255.255.255.255 broadcast bbb192 ether 02:00:00:10:5f:d7 txqueuelen 1000 (Ethernet)
KVMnetworking设置
<interface type='network'> <mac address='02:00:00:10:5f:d7'/> <source network='default' bridge='virbr0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface>
主机brctl
bridge name bridge id STP enabled interfaces br0 8000.000000000000 no virbr0 8000.5254003afbf8 yes virbr0-nic vnet0
客人arp -an
? (aaa254) at (incomplete) on ens3
目前,客人无法访问互联网。 我已经阅读并重读每一篇针对OVH的文章,甚至只是一般的libvirt文档,在这一点上难倒。 这是我第一次使用直接KVM,而不是使用像ESXi这样的系统,但是我经常处理cli。 我感谢任何可以提供的援助。
虚拟networkingvirbr0configuration为使用虚拟机的NAT。 你想要达到的目的是将物理设备eth0连接到例如br0 ,并将虚拟机连接到这个网桥。
eth0将成为br0一部分,并且您必须configuration连接到br0 eth0的IP地址。 欲了解更多详情,请按照这里的步骤。
既然你运行的是Fedora 26,你也应该可以使用这里解释的macvtap 。