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件
2025-03-23 2025-03-22 2025-03-20 2025-03-17 2025-03-16 2025-03-15 2025-03-10 2025-03-08 2025-03-06 2025-03-03 2025-03-02 2025-03-01 2025-02-23 2025-02-18 2025-02-17 2025-02-14 2025-02-12 2025-02-03 2025-02-02 2025-01-27 2025-01-26 2025-01-25 2025-01-24 2025-01-23 2025-01-20 2025-01-13 2025-01-12 2025-01-08 2024-12-30 2024-12-29 2024-12-22 2024-12-20 2024-12-17 2024-12-15 2024-12-14 2024-12-12 2024-12-11 2024-12-10 2024-12-09 2024-11-28 2024-11-22 2024-11-15 2024-11-14 2024-11-12 2024-11-06 2024-11-05

edit


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