To access the virtual machine’s console under X-Window, type:
# virt-manager
If you aren’t under X-Window, there is another way to access a virtual machine’s console: you have to create a serial console.
On the virtual machine, add the following line at the end of the /etc/inittab file:
# echo "S0:12345:respawn:/sbin/agetty ttyS0 115200" >>/etc/inittab
Add ‘console=ttyS0‘ at the end of the kernel lines in the /boot/grub/grub.conf file:
# grubby --update-kernel=ALL --args="console=ttyS0"
Allow root to connect at the console:
# echo "ttyS0" >>/etc/securetty
Now, reboot the virtual machine:
# reboot
Connect to the virtual machine’s console (here vm.example.com):
# virsh console vm.example.com
Leave a Reply
You must be logged in to post a comment.