There are three reasons for doing this:
1) I have modified the Linux kernel, but it cannot be started normally. I cannot enter the system and cannot use dmesg. Therefore, I want to use the serial port debugging function to output the startup information.
2) I checked a bunch of information on the Internet and tried to output xen hvm via serial port. I tried minicom and gtkterm on the client, but it was not successful...
3) In xencommonproblems, you can use the XM console to output the hvm startup information.
Another problem is that the kernel does not output a lot of stack trace information when it is not started normally, and it still cannot be fully captured. If anyone has a good solution, leave a message to tell me, thank you very much...
Alas, I am tortured. Now I have recorded my settings,General
My hvm domu is Ubuntu 10.04, so I found this article serialconsolehowto, which also contains the settings of the minicom client. However, I need to use the XM console, so there are three steps in total:
1) Add a ttys0.conf file under the/etc/init directory. The content is as follows:
# ttyS0 - getty## This service maintains a getty on ttyS0 from the point the system is# started until it is shut down again.start on stopped rc RUNLEVEL=[2345]stop on runlevel [!2345]respawnexec /sbin/getty -L 115200 ttyS0 vt102
2) edit the/etc/default/GRUB file and modify the following parameters:
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0"
GRUB_TERMINAL=serialGRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
Here, because I want to output the domu startup informationRemove "quiet" from the grub_cmdline_linux_default ParameterBecause it will block normal text output...
3) Update grub
Sudo Update-grub
Finally, add a line to the domu config file:
Serial = 'PTY'
Start the VM, and then XM ConsoleNameTo view the startup information of domu.