Xen has a built in console when creating paravirtualized DOMU's, but this does not extend to hardware virtualized ones. In this case, we need to modify the configuration file, then set the DOM0 up to send messages and allow logins from the serial console.
This is basically like setting up a computer with a serial console and connecting to it via a serial cable.
- in configuration file for DOMU (on DOM0), add the line:
- In DOMU
- edit /etc/inittab and find line which starts with co:2345 and
- comment any line that looks like ??:2345 by adding a pound sign in front (#)
- Find the line which say
sT0:23:respawn:/sbin/getty -L ttyS0 38400 vt100and uncomment it by removing the pound sign in front of it
- To make the changes immediate, without rebooting the server, enter the command
init q # or kill -HUP 1to tell init to reload. At this point, you should be able to execute the command xm console domainname from the DOM0
- edit /etc/default/grub. At the bottom of the file, add the following three lines
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,38400n8" GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"
- Execute command grub-mkconfig > /boot/grub/grub.cfg
- reboot DOMU and you should be able to access console via xm console. NOTE: this is a very basic console, so don't expect pretty