Perform this task to configure a serial port for a Linux VM. Before you can view console logs from the console of a VM, verify that
You must log in to the VM as the root user.
If the VM uses the ARM architecture and is configured with kernel boot parameters by default, you do not need to re-configure them.
The following procedure uses the CentOS 6 series as an example to modify the
Execute the following command to view the files in the
Execute the following command to open the
Enter
At the end of the line where the
Press
Restart the VM.
The following procedure uses the CentOS 7 series as an example to modify the /default/grub file of an ARM VM.
Execute the following command to view the files in the
Execute the following command to open the
Enter
Enter
Press
Execute the following command to update the
Restart the VM.
The following tables show the methods for configuring a serial port for different Linux operating systems:
Table-1 Serial port configuration methods for x86 VMs
Operating system type | Boot configuration file | Configuration method |
| /boot/grub/ menu.lst | Add |
| /boot/grub2/grub.cfg | Add |
| /boot/grub/menu.lst | Add |
| /boot/grub2/grub.cfg | Add |
| /boot/grub/grub.cfg | Add |
CoreOS series | /usr/share/oem/grub.cfg | Execute the
|
Table-2 Serial port configuration methods for ARM VMs
Operating system type | Boot configuration file | Configuration method |
| /boot/grub2/grub.cfg | Add |
| /boot/grub2/grub.cfg | Add |
| For more information about configuring a serial port for a Linux operating system not listed in Table-1or Table-2, see the help documentation accompanying with the operating system. |