ubuntu-10.04 – 网络重启后KVM客户端失去连接

前端之家收集整理的这篇文章主要介绍了ubuntu-10.04 – 网络重启后KVM客户端失去连接前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们正在用kvm设置一个ubuntu服务器10.04主机.主机设置了绑定和桥接接口,允许访客无需访问即可访问网络.
我们当前的配置工作正常,除非我们使用/etc/init.d/networking restart重新启动网络.
重新启动网络后,来宾失去连接.恢复它的唯一方法是暂停访客并重新启动它.

我一直在四处寻找,但我似乎无法找到任何已知的此行为的错误/问题/报告.

以下是我们的网络配置文件

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet manual
    bond-slaves none
    bond-mode active-backup
    bond-downdelay 250
    bond-updelay 120
    bond-miimon 100

auto eth0
iface eth0 inet manual
    bond-master bond0
    bond-primary eth0 eth1

auto eth1
iface eth1 inet manual
    bond-master bond0
    bond-primary eth0 eth1

#bridge used by host
auto br-vlan180
iface br-vlan180 inet static
    address 10.0.0.200
    netmask 255.255.255.0
    gateway 10.0.0.1
    vlan-raw-device bond0
    bridge_ports vlan180
    bridge_maxwait 0
    bridge_fd 0
    bridge_stp off
#bridge without address,used by vm
auto br-vlan120
iface br-vlan120 inet manual
    vlan-raw-device bond0
    bridge_ports vlan120
    bridge_maxwait 0
    bridge_fd 0
    bridge_stp off

谢谢

ADDENDUM – 在nw restart之前和之后的brctl显示输出

NW RESTART之前的BRCTL节目

brctl show
bridge name bridge id       STP enabled interfaces
br-vlan120      8000.984be1644072   no      vlan120
                            vnet0
                            vnet1
br-vlan180      8000.984be1644072   no      vlan180
virbr0      8000.000000000000   yes

NW RESTART之后的BRCTL显示

brctl show
bridge name bridge id       STP enabled interfaces
br-vlan120      8000.984be1644072   no      vlan120
br-vlan180      8000.984be1644072   no      vlan180
virbr0      8000.000000000000   yes

显然,两个虚拟接口在网络重启后无法恢复.

PS BEFORE NW RESTART

ps -ef | grep qemu
root      1784     1  6 11:45 ?        00:00:40 /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 1 -name test02 -uuid ee6d84b6-dbf8-d93c-b32f-8ae6b7d9b80e -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/test02.monitor,server,nowait -monitor chardev:monitor -boot c -drive file=/dev/sysvg/test02,if=virtio,index=0,boot=on,format=raw -drive file=/root/ubuntu-10.04.2-server-amd64.iso,if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:2c:d1:26,vlan=0,name=nic.0 -net tap,fd=48,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370
root      2711     1 89 11:55 ?        00:00:14 /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 2 -name nttest -uuid 04ca381e-0510-7d3c-c7e2-8f7d7b6ea58f -chardev socket,path=/var/lib/libvirt/qemu/nttest.monitor,nowait -monitor chardev:monitor -localtime -boot c -drive file=/dev/sysvg/nttest,format=raw -drive file=/root/SW_DVD5_Windows_Svr_DC_EE_SE_Web_2008_R2_64Bit_English_w_SP1_MLF_X17-22580.ISO,macaddr=52:54:00:62:1b:2e,fd=51,id=serial0 -serial chardev:serial0 -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:1 -vga cirrus -soundhw es1370

PS重新启动NW后

ps -ef | grep qemu
root      1784     1  4 11:45 ?        00:00:59 /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 1 -name test02 -uuid ee6d84b6-dbf8-d93c-b32f-8ae6b7d9b80e -chardev socket,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370
root      2711     1 39 11:55 ?        00:03:51 /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 2 -name nttest -uuid 04ca381e-0510-7d3c-c7e2-8f7d7b6ea58f -chardev socket,id=serial0 -serial chardev:serial0 -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:1 -vga cirrus -soundhw es1370
嗯,有一个问题,当你重新启动网络时,vnetX tap设备没有重新连接,导致VM失去与网桥的连接.

我猜你可以手动将它们重新连接到网桥,因为它们仍然在运行,但正确的方法是将VM迁移到你进行网络更改的主机,或者让VM关闭,如果你是在单一主机模式下.在大多数企业级系统中,这称为“维护模式”,更改网络配置肯定是维护.

原文链接:https://www.f2er.com/ubuntu/348403.html

猜你在找的Ubuntu相关文章