$cat anolis23.xml ... <disk type='file' device='disk'> <driver name='qemu' type='vpc' cache='none' io='native' dataplane='on'/> <source file='/home/qijiang.qj/workspace/images/AnolisOS-23-beta-x86_64.vhd'/> <target dev='vda' bus='virtio'/> </disk> ... $sudo virsh create anolis23.xml $sudo virsh list Id Name State ---------------------------------------------------- 9 joe-anolis23 running $sudo virsh console 9 Connected to domain joe-anolis23 Escape character is ^] 串口卡住,无法连接。
Created attachment 459 [details] 串口服务异常
vhd默认的启动参数配置的串口为console=tty0 console=ttyS0,115200n8,但是环境上默认enable的串口为hvc0。 需要执行如下命令enable并启动相关的串口服务: systemctl enable serial-getty@hvc0.service systemctl start serial-getty@hvc0.service 另外如果需要在串口获取信息,需要配置console=hvc0。 相关信息参考:http://0pointer.de/blog/projects/serial-console.html