用virsh console vhosts 卡住
[root@666 ok]# virsh list --all
Id Name State
----------------------------------------------------
1 c01 running
- c02 shut off
- c03 shut off
- c70 shut off
- w7 shut off
- win7 shut off [root@666 ok]# virsh console c01
Connected to domain c01
Escape character is ^]
解决问题以下几步:
# cat /etc/securetty
console
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
# echo "ttyS0">>/etc/securetty
[root@DB ~]# cat /etc/securetty
console
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
vc/
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
ttyS0
#追加了ttyS0
在/etc/grub.conf文件中为内核添加参数:
console=ttyS0
[root@DB ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=
timeout=
splashimage=(hd0,)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.-.el6.x86_64)
root (hd0,)
kernel /vmlinuz-2.6.-.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF- rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet console=ttyS0 #在这里增加参数
initrd /initramfs-2.6.-.el6.x86_64.img
在/etc/inittab中添加agetty:
S0:12345:respawn:/sbin/agetty ttyS0 115200
[root@DB ~]# tail -n /etc/inittab
id::initdefault:
S0::respawn:/sbin/agetty ttyS0 #增加的参数
生启虚机后,再次连接,成功:
[root@ ok]# virsh start c01
Domain c01 started [root@ ok]# virsh console c01
Connected to domain c01
Escape character is ^]
emon: [ OK ] CentOS release 6.8 (Final)
Kernel 2.6.-.el6.x86_64 on an x86_64 DB login: root
Password:
Last login: Wed Dec :: from 10.100.0.5
用virsh console vhosts 卡住的更多相关文章
- virsh console使用方法
How to use virsh console virsh 是libvirt 开源函数库中的一个命令行工具,用来在命令行下通过libvirt发布管理虚拟机的各种命令,现在介绍一下其中一个命令的使用方 ...
- KVM 通过virsh console连入虚拟机
新安装一台虚拟机后,是无法通过virsh console 命令连入虚拟机中的,这时我们需要开启虚拟机的console功能. 一.添加ttyS0的许可,允许root登陆 [root@localhost ...
- CentOS 7下宿主机使用virsh console访问KVM的设置
在CentOS 6下要实现宿主机使用virsh console访问KVM可以说是非常麻烦,但这一问题在CentOS 7已经解决了,只需要两条命令在KVM下即可实现. 1.在KVM(客户机)下开机启动并 ...
- KVM使用virsh console无法连接的解决办法(转)
一.问题描述: KVM中宿主机通过console无法连接客户机,卡在这里不动. # virsh console vm01 Connected to domain vm01 Escape charact ...
- virsh console配置
If you're trying to get to the console, you can either use virt-viewer for the graphical console or ...
- virsh console hangs at the escape character “^]”
I am trying to kickstart a newly built VM. I am stuck with the following. Want to start with a conso ...
- KVM virsh console
(1) 查看正在运行的虚拟机 root@kvm:~# virsh list Id Name State ------------------------------------------------ ...
- virsh console 登录CentOS7系统
一.在kvm虚拟机中执行如下命令 systemctl start serial-getty@ttyS0.service systemctl enable serial-getty@ttyS0.serv ...
- 通过virsh console进入虚拟机
1.virsh启动一个虚拟机.执行脚本test_qga.sh 2.virsh vncdisplay <vm_ID> 3.vnc登录到vm里面,执行#systemctl start seri ...
随机推荐
- python实现链表(一)
单链表结构简单,组成为节点 节点实现方法我们采用类进行封装 def __init__(self,item): self.item=item self.next=None 在这里我们实现对链表的操作时可 ...
- Wan Android 项目总结
Wan Android 项目总结 项目的由来 这个项目也算是自己学习了一段时间的Android以后的一个总结和学习吧,项目采用了Kotlin语言,Api采用的hongyang大神的WanAndroid ...
- webpack打包之有依赖es2015模块
一.入口文件main.js import { isDepend } from './depend.js'; import { fn } from './depend2.js'; if(isDepend ...
- WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[__NSArrayM objectForKey:]: unrecognized s
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv=&quo ...
- Html块标签、含样式的标签、语义化的标签:
Html块标签: (1)<div>标签 块元素,表示一块内容,没有具体的语义 (2)<span>标签 行内元素,表示一行中的一小段内容,没有具体的语义 <p>标签 ...
- Vue(四)事件和属性
1. 事件 1.1 事件简写 v-on:click="" 简写方式 @click="" <button v-on:click="show&quo ...
- HTML5 学习08——Input 类型、表单元素及属性
注意:并不是所有的主流浏览器都支持新的input类型,不过您已经可以在所有主流的浏览器中使用它们了.即使不被支持,仍然可以显示为常规的文本域. (1)Input 类型: color color 类型: ...
- Mac流量监控/硬盘监控小工具
效果: 中文版: https://member.ipmu.jp/yuji.tachikawa/MenuMetersElCapitan/ 官方版: https://github.com/yujitach ...
- Using async-await on .net 4
I'm currently starting to create an application that would profit a lot from C# 5's async-await feat ...
- Impala Apache Hadoop 安装方法
http://blog.csdn.net/mayp1/article/details/50952512