器量大者,福泽必厚
全部博文(587)
分类: LINUX
2013-01-28 14:05:06
virsh # quit
[root@nfs ~]# /etc/init.d/libvirtd restart
Stopping libvirtd daemon: [ OK ]
Starting libvirtd daemon: [ OK ]
只好重启机器!
[root@nfs ~]# syncdefault inactive no
还有一种方法:先要在上面的基础上
[root@nfs ~]# virsh net-autostart default ##将default网桥恢复为随系统自动启动
Network default marked as autostarted
[root@nfs ~]# /etc/init.d/libvirtd restart
Stopping libvirtd daemon: [ OK ]
Starting libvirtd daemon: [ OK ]
[root@nfs ~]# ifconfig
br0 Link encap:Ethernet HWaddr 00:E0:6F:12:AC:8A
inet addr:192.168.1.62 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:6fff:fe12:ac8a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:473 errors:0 dropped:0 overruns:0 frame:0
TX packets:333 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:59575 (58.1 KiB) TX bytes:38519 (37.6 KiB)
eth0 Link encap:Ethernet HWaddr 00:E0:6F:12:AC:8A
inet6 addr: fe80::2e0:6fff:fe12:ac8a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:889 errors:0 dropped:0 overruns:0 frame:0
TX packets:310 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:208317 (203.4 KiB) TX bytes:34576 (33.7 KiB)
Interrupt:28 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11824 (11.5 KiB) TX bytes:11824 (11.5 KiB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:11:B2:F3
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:1919 (1.8 KiB)
[root@nfs ~]# virsh net-list
Name State Autostart
-----------------------------------------
default active yes
[root@nfs ~]# virsh net-destroy default
Network default destroyed
[root@nfs ~]# virsh net-list
Name State Autostart
-----------------------------------------
[root@nfs ~]# virsh net-undefine default
Network default has been undefined
[root@nfs ~]# ifconfig
br0 Link encap:Ethernet HWaddr 00:E0:6F:12:AC:8A
inet addr:192.168.1.62 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:6fff:fe12:ac8a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:623 errors:0 dropped:0 overruns:0 frame:0
TX packets:411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:80064 (78.1 KiB) TX bytes:48613 (47.4 KiB)
eth0 Link encap:Ethernet HWaddr 00:E0:6F:12:AC:8A
inet6 addr: fe80::2e0:6fff:fe12:ac8a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1152 errors:0 dropped:0 overruns:0 frame:0
TX packets:387 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:271011 (264.6 KiB) TX bytes:44440 (43.3 KiB)
Interrupt:28 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11824 (11.5 KiB) TX bytes:11824 (11.5 KiB)
显然virbr0已经没有了!
[root@nfs ~]# virsh net-list --all
Name State Autostart
-----------------------------------------
[root@nfs ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.00e06f12ac8a no eth0
显然virbr0 已经不存在了!
##官方文档!
You can remove all libvirt virtual networks on the machine:
下面是virbr0 显示不出来了,如何恢复它!
[root@nfs networks]# cd /usr/share/libvirt/networks/
[root@nfs networks]# ls
default.xml
[root@nfs networks]# clear
[root@nfs networks]# ls
default.xml
[root@nfs networks]# virsh net-list --all
Name State Autostart
-----------------------------------------
[root@nfs networks]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.00e06f12ac8a no eth0
vnet0
[root@nfs networks]# virsh net-define /usr/share/libvirt/networks/default.xml
Network default defined from /usr/share/libvirt/networks/default.xml
[root@nfs networks]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.00e06f12ac8a no eth0
vnet0
[root@nfs networks]# virsh net-list --all
Name State Autostart
-----------------------------------------
default inactive no
[root@nfs networks]# virsh net-start default
Network default started
[root@nfs networks]# virsh net-autostart default
Network default marked as autostarted
[root@nfs networks]# virsh net-list --all
Name State Autostart
-----------------------------------------
default active yes
[root@nfs networks]# brc
brcm_iscsiuio brctl
[root@nfs networks]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.00e06f12ac8a no eth0
vnet0
virbr0 8000.5254001e3f67 yes virbr0-nic
[root@nfs networks]#
机器网络不通的处理过程:留为备份
能ping 通外网8.8.8.8 ,显然已经正常!