xen错误与解决方法汇总
(2012-02-01 17:59:07)
标签:
it |
分类: linux知识 |
1、Hint to configure libvirt without bothering qemu errors in
xen
This is not a bug, but annoying
Since I have xen and no kvm the qemu dirvers report errors all the
time - This may help everyone with the same setup.
libvir: QEMU error : connect:
/usr/local/var/run/libvirt/qemud-sock: No such file or
directory
libvir: warning : Failed to find the network: Is the daemon running
?
libvir: error : library call virConnectNumOfNetworks failed,
possibly not supported libvir: error : library call
virConnectNumOfDefinedNe
[..]
The last two lines are printed every second!
To "unconfigure" qemu and therefore prevent these message flooding
use
./configure --without-qemu
simple but useful ;-)
2、系统日志中大量如下警告:
Dec 2 16:11:08 gamebbs2 snmpd[1056]: Received SNMP packet(s) from
UDP: [192.168.239.93]:-13093
Dec 2 16:11:08 gamebbs2 kernel: audit(1228205468.528:120): avc:
denied { read append } for pid=1056 comm="snmpd" name="snmpd.log"
dev=dm-0 ino=3717987 scontext=system_u:system_r:snmpd_t:s0
tcontext=user_u:object_r:var_log_t:s0 tclass=file
Dec 2 16:11:08 gamebbs2 snmpd[1056]: Received SNMP packet(s) from
UDP: [192.168.239.93]:-13092
Dec 2 16:11:08 gamebbs2 kernel: audit(1228205468.940:121): avc:
denied { read append } for pid=1056 comm="snmpd" name="snmpd.log"
dev=dm-0 ino=3717987 scontext=system_u:system_r:snmpd_t:s0
tcontext=user_u:object_r:var_log_t:s0 tclass=file
Dec 2 16:16:15 gamebbs2 snmpd[1056]: Received SNMP packet(s) from
UDP: [192.168.239.93]:-12384
原因是开启了selinux,snmp的日志文件因受selinux保护,snmp不能正常写入,解决方法有几种:
(1)停止snmpd,删除snmpd日志文件,再启动snmpd即可恢复,不过此方法处理后可能在下次重启系统后仍然会出现这个情况。
(2)直接关闭selinux(setenforce 0)
(3)修改selinux的策略(selinux不熟,哪位高手提供一下方法)
3、网卡lo流量很高
alias net-pf-10 off
alias ipv6 off
4、ssh远程连接到服务器后进行操作会停顿,在控制台相接操作没有此情况
alias net-pf-10 off
alias ipv6 off
tc qdisc show dev eth0
5、在rh5u2前的系统上安装Fedora10作为DomU不成功
6、在XEN主机上,写在/etc/init.d/network上的路由不生效,但是改为非虚拟系统的时候正常
7、ssh连接domU可以正常连接,使用xm console domname连接domU的控制台的时候报如下错误:
xenconsole: Could not read tty from store: No such file or
directory
某些客户机还可能出现无法启动的现象。
可能是xend进程有问题,可以考虑重启xend进程:
/etc/init.d/xend restart
8、安装domU过程中,在输入客户机IP后不能获取到安装源的数据,使用DHCP获取不到地址
查看dom0中网络配置情况,检查是否domU连接到了错误的网桥上
brctl show
如果是,修正vif连接到的网桥,用brctl命令进行删除和添加
例如:
#brctl
show
#xm
list
#brctl delif virbr0 vifx.0
#从错误的网桥中删除vifx.0(x.0中x为ID编号,0表示第一块网卡,下同)
#brctl addif xenbr0 vifx.0 #在正确的网桥中加入vifx.0
#brctl
show
9、安装客户机过程中跨网段安装失败
10、64位的RHEL5U2机器,安装客户机,重启客户机等都会卡住,在check image附近
初步估计为在有客户机运行期间,主机的时间跟实际时间有较大的差距的情况下运行了ntpdate的原因,如果已经运行了该命令,暂时未发现较好的解决方法,只能重启物理服务器。
如果还未运行客户机,可考虑先关闭客户机,再运行ntpdate校准,然后再启动客户机。
11、在单台物理XEN主机上同时进行两个虚拟客户机的安装可能会出现冲突,导致系统无响应
12、用virt-install安装客户机的时候报如下错误:
virDomainCreateLinux() failed XML description for domain is not
well formed or invalid
Domain installation may not have been
successful. If it was, you can restart your domain
by running 'virsh start new216'; otherwise, please
restart your installation.
Mon, 09 Mar 2009 14:57:22
ERROR
Traceback (most recent call last):
File "/usr/sbin/virt-install", line 502, in ?
File "/usr/sbin/virt-install", line 462, in main
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line
813, in start_install
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line
834, in _do_install
File "/usr/lib64/python2.4/site-packages/libvirt.py", line 573, in
createLinux
libvirtError: virDomainCreateLinux() failed XML description for
domain is not well formed or invalid
出现此报错应该是主机系统在启动的时候有起libvirtd服务,但是后来关闭了,而virt-install工具在进行客户机系统安装的时候错误地将客
户机的网卡连接到libvirtd服务起的网桥virbr0上,此时libvirtd是关闭的,所以virbr0也不存在了,就出现了上面的错误信息。
解决方法有两个:
(1)、启动libvirtd服务后重新用原来的virt-install命令安装客户机操作系统;
#/etc/init.d/libvirtd start
(2)、在原来的virt-install命令后面加-b参数指定需要连接的网桥,如果未调整网络,一般默认的网桥应该为xenbr0
要查看网桥的名称可以使用brctl命令查看
#brctl show
[root@XenHost ~]# brctl show
bridge
name
xenbr0