console

virshで仮想マシンにconsoleで接続するなら virsh で「console <ドメイン>」なのだが、

[root@i ~]# virsh
Welcome to virsh, the virtualization interactive terminal.
 
Type:  'help' for help with commands
       'quit' to quit
 
virsh # console centos7.0
Connected to domain centos7.0
Escape character is ^]                  <-- ここで止まってしまう

と何も仮想マシンに設定しないとここで止まってしまう。
解消するには、仮想マシンのサービスを有効にする

systemctl enable serial-getty@ttyS0.service
 
systemctl start serial-getty@ttyS0.service

これでconsoleコマンドで接続が可能になる

[root@i ~]# virsh
Welcome to virsh, the virtualization interactive terminal.
 
Type:  'help' for help with commands
       'quit' to quit
 
virsh # console centos7.0
Connected to domain centos7.0
Escape character is ^]
 
CentOS Linux 7 (Core)
Kernel 3.10.0-1160.25.1.el7.x86_64 on an x86_64
 
localhost login:
最新の60件
2026-01-18 2026-01-17 2026-01-16 2026-01-12 2026-01-11 2026-01-10 2026-01-09 2026-01-08 2026-01-06 2026-01-04 2026-01-01 2025-12-31 2025-12-28 2025-12-27 2025-12-12 2025-12-11 2025-12-09 2025-12-08 2025-12-07 2025-12-05 2025-11-30 2025-11-27 2025-11-24 2025-11-23 2025-11-18 2025-11-16 2025-11-05 2025-11-03 2025-11-02 2025-10-30 2025-10-29 2025-10-28 2025-10-26 2025-10-25 2025-10-24 2025-10-22 2025-10-21 2025-10-17 2025-10-13 2025-10-11 2025-10-06 2025-10-05

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-06-09 (水) 16:04:24