用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 ...
随机推荐
- mongoose update操作属性中的变量
最近在学习mongoose操作数据库,利用schema模型.记录一下通过使用update()操作实现数据库更新: 可在属性中添加变量,'属性名.0',可以修改该属性的第一条属性,依次类推,但是如果想实 ...
- Xamarin SQLite教程Xamarin.iOS项目添加引用
Xamarin SQLite教程Xamarin.iOS项目添加引用 使用直接方式访问SQLite数据库,需要将System.Data和Mono.Data.SQlite库导入到创建的项目中.下面将分别讲 ...
- ICPC Asia Regional 2015 Japan.Routing a Marathon Race(DFS)
vjudge \(Description\) 给定一张\(n\)个点\(m\)条边的无向图,每个点有一个权值.求一条从\(1\)到\(n\)的路径,使得代价最小,输出最小代价. 一条路径的代价定义为, ...
- Spring MVC中Controller返回值void时报错
Controller如下: 当使用url访问该处理器方法时,报错如下: 26-Jan-2019 21:16:28.105 警告 [http-nio-8080-exec-39] org.springfr ...
- 【Luogu3381】【模板】缩点
本文同步发表于https://www.zybuluo.com/Gary-Ying/note/1235385 题目描述 给定一个n个点m条边有向图,每个点有一个权值,求一条路径,使路径经过的点权值之和最 ...
- HDU 5985 Lucky Coins 数学
Lucky Coins 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5985 Description Bob has collected a lot ...
- nullptr/NULL
NULL vs nullptr 在过去,我们如果要表示一个指针为空,我们条件反射肯定会这么写: int *p = NULL; 然而啊,有没有想过这是有问题的,比如下面的这段代码: #include & ...
- Vue(十三)自定义指令
自定义指令 分类:全局指令.局部指令 1. 自定义全局指令 使用全局方法Vue.directive(指令ID,定义对象) 2. 自定义局部指令 <!DOCTYPE html> < ...
- 关于实现udev/mdev自动挂载与卸载
在网上有很多关于讲mdev的自动挂载基本上都是一个版本,经过测试自动挂载确实可行,但是关于自动卸载mdev似乎不能很好的支持,经过修改已经可以做到与udev的效果相似.不能在挂载的目录中进行热插拔,否 ...
- Docker命令使用详解(转)
如果各位看官熟悉 Git 和 GitHub ,可与 Docker 做个类比,可更加容易理解 Docker 和 Docker Hub 及两者关系. 1. docker version 显示 Docker ...