Title here
Summary here
对于Linux服务器还可以通过
virsh console
访问虚拟机。
从宿主机编辑虚拟机的配置
<serial type='pty'>
<source path='/dev/pts/0'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/0'>
<source path='/dev/pts/0'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
方案1:从虚拟机启用串口服务
sudo systemctl enable --now [email protected]
方案2:将console参数加到GRUB配置grub.cfg
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
virsh console <vmname>