KVM virbr0 加载失败

【问题描述】

Skip to end of metadata Go to start of metadata 【问题描述】

kvm 安装完成查看自己建的网络virtbr0没了,ifconfig 后果然没了virbr0

=============================================================

然后尝试 virsh net-start default,又得到dnsmasq的错误:

error: Failed to start network default  error: internal error Child process (dnsmasq --strict-order --bind-interfaces

 --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254

 --dhcp-lease-max=253 --dhcp-no-override) exited with status 2.

=========================================================

/var/log/message

Aug 28 19:27:16 ezzze dnsmasq[4357]: failed to create listening socket for 192.168.122.1: Address already in use Aug 28 19:27:16 ezzze dnsmasq[4357]: FAILED to start up

 

【思路分析】

 经过google查找资料

发现你要是单独安装dnsmasq和libvirt就会出现这个问题....

具体的扯皮在https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/231060

两边的人都不愿意改....但是提供了解决方案:

Following advice in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505522 We could for example have:

/etc/dnsmasq.d/libvirt   bind-interfaces   except-interface=<virtual bridge>

and libvirt would start its dnsmasq using --interface=<virtual-bridge>

最终我使用的方法,dnsmasq和libvirt全部移除,重新一起安装。

【解决步骤】

[root@cloud001 ~]# yum remove  libvrit-python libvirt dnsmasq

[root@cloud001 ~]#shutdown -r now

[root@cloud001 ~]# yum -y install  libvrit-python libvirt dnsmasq

[root@cloud001 ~]#/etc/init.d/libvirtd restart

[root@cloud001 ~]#/etc/init.d/dnsmasq restart

[root@cloud001 ~]# chkconfig libvirtd on

[root@cloud001 ~]# chkconfig dnsmasq on

[root@cloud001 ~]# /etc/init.d/network restart


你可能感兴趣的:(kvm)