Chinaunix首页 | 论坛 | 博客
  • 博客访问: 928544
  • 博文数量: 245
  • 博客积分: 11429
  • 博客等级: 上将
  • 技术积分: 2662
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-15 00:16
文章存档

2011年(56)

2010年(174)

2009年(15)

分类: LINUX

2010-09-27 11:44:18

xen使用中遇到2个小问题

1、我的xen运行在centos5.2上,已经可以安装vm了,但是安装5,6台后,就开始出现下面的错误信息:
        Failed to find an unused loop device
        很明显,因为使用的文件的方式,而不是分区的方式,loop设备已经不够了,loop设备默认是8个,可以lsmod|grep loop查看加载的模块,可以通过ls /dev/loop*查看loop块设备,这个是可以增加的,可以使用如下命令增加为16个:

rmmod loop
modprobe loop max_loop=16

如果需要开机自动加载loop模块并创建16个设备,可以修改/etc/modprobe.conf,增加一行:options loop max_loop=16,重启服务器,就可以看到生成16个loop了
        另外,据说mknod可以创建块设备或者字符设备,mknod -m660 /dev/loop b 7 8,但是我尝试使用这个设备的时候,可能哪里有点问题。

2、安装了8个vm以后,启动vm,但是总是有2个没有反应,可以启动,但是虚拟终端只显示:Console is not yet active for guest,cpu占用为0,而且还无法关闭,只能destroy掉。查看日志,发现如下线索:

domid: 23
qemu: the number of cpus is 2
Watching /local/domain/23/logdirty/next-active
xs_read(): vncpasswd get error. /vm/14c1d5ec-5473-7cd0-4732-d0ef810f98d5/vncpasswd.
bind() failed

于是,坚信我不是遇到这个问题的第一人,搜索,发现了,是这么说的:

Auteur: Artur Linhart - Linux communication
Date:  2008-06-21 18:48  +800
À: 'Michael Jinks', xen-users
Sujet: RE: solved, Re: [Xen-users] Windows domU doesn't boot
 
Hello,

    I had the same problem. But I do not think, this is related to the
serial='pty'
setting... In my case this line was remmed out in the configuration, but the
error
bind() failed
was till there...

The real problem is (at least in my case was) in the specification of
"vnclisten" parameter - this specifies the address where the machine should
"hear" to incomig VNC connections for management of the HVM hosts. If there
is specified an invalid address, then the vnc "server" for that virtual
instance cannot be started, because there fails the bind of the service to
the specified port on specified address.

This is also consistent with the fact the qemu-dm starts, but then
everything stops and the TCP post is not allocated, what can be seen if
running
netstat -a -n

Michael, is it possible in Your case this was the same and You not only
remmed-out the "serial" oto, bu also repaired the IP address specified in
vnclisten parameter?

也就是说,是绑定vnc失败导致的问题,于是调整了vm的显示设备,果然一切正常了。
 

阅读(1133) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-12-02 12:13:10

谢谢解答,我现在可以安装多个虚拟机了

chinaunix网友2010-12-01 20:54:30

兄弟 怎么调整vm的显示设备啊,给些提示,我也遇到了你所说的问题? 谢谢!

chinaunix网友2010-09-29 20:02:47

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com