宿主机进行连接
- [root@ken ~]# ssh 192.168.122.198
- The authenticity of host '192.168.122.198 (192.168.122.198)' can't be established.
- ECDSA key fingerprint is SHA256:t+jpHwwHJk8mo2XZB93H9afhSVy7BCMvLsvqsUF+Obg.
- ECDSA key fingerprint is MD5:48:d5:9e:db:f8:bb:5e:56:c1:c8:1d:a2:4b:45:d6:fc.
- Are you sure you want to continue connecting (yes/no)? yes
- Warning: Permanently added '192.168.122.198' (ECDSA) to the list of known hosts.
- root@192.168.122.198's password:
- Last login: Mon Mar 18 21:06:27 2019
- [root@localhost ~]# ip a
- 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
- link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
- inet 127.0.0.1/8 scope host lo
- valid_lft forever preferred_lft forever
- inet6 ::1/128 scope host
- valid_lft forever preferred_lft forever
- 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
- link/ether 52:54:00:89:17:d7 brd ff:ff:ff:ff:ff:ff
- inet 192.168.122.198/24 brd 192.168.122.255 scope global dynamic eth0
- valid_lft 3510sec preferred_lft 3510sec
- inet6 fe80::5054:ff:fe89:17d7/64 scope link
- valid_lft forever preferred_lft forever
登录退出虚拟机
第一步:在创建的KVM虚拟机里面执行如下的命令
[root@localhost ~]# grubby --update-kernel=ALL --args="console=ttyS0"
第二步:重启KVM虚拟机
第三步:使用virsh console登录登录虚拟机
执行virsh console 虚拟机名称
- [root@ken ~]# virsh console Centos7-x86_64
- Connected to domain Centos7-x86_64
- Escape character is ^] #到这步再次按回车
- CentOS Linux 7 (Core)
- Kernel 3.10.0-327.el7.x86_64 on an x86_64
- localhost login: root #输入用户
- Password: #密码
- Last login: Mon Mar 18 22:19:47 on ttyS0
- [root@localhost ~]#
第四步:退出KVM虚拟机
按这两个组合键,按ctrl加上中括号的右边: ctrl+]
- [root@ken ~]# virsh console Centos7-x86_64
- Connected to domain Centos7-x86_64
- Escape character is ^]
- CentOS Linux 7 (Core)
- Kernel 3.10.0-327.el7.x86_64 on an x86_64
- localhost login: root
- Password:
- Last login: Mon Mar 18 22:20:44 on ttyS0
- [root@localhost ~]#
- [root@ken ~]#
克隆虚拟机
(编辑:南平站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|