HOME 生活记录运维/编程
作者/来源:yixinu.com
栏目:运维/编程
日期:2012-12-18 05:16:34

在KVM中安装了一个RHEL6.1,启动virsh命令想通过console命令连接至客户机的终端,结果输入命令后终端卡在这个状态:

virsh # console test
Connected to domain test
Escape character is ^]

敲任何键都没反应,求助万能的Google。原来想通过console连接客户机终端还要在客户机上做相应设置,大致如下:

添加ttyS0:

echo “ttyS0″ >> /etc/securetty

在/etc/grub.conf文件中为内核添加参数:

console=ttyS0

在/etc/inittab中添加agetty:

S0:12345:respawn:/sbin/agetty ttyS0 115200

重启客户机:

reboot

此时,再次尝试console命令可以正常使用:

virsh # console test
Connected to domain test
Escape character is ^]

Red Hat Enterprise Linux Server release 6.1 (Santiago)
Kernel 2.6.32-131.0.15.el6.x86_64 on an x86_64

station32.loveky.info login:
分享到:

Copyright © 2013-2014 yixinu.com 湘ICP备14004402号

QQ:316686606  Email: 316686606@qq.com