Serial console XenServer 5

From PrgmrWiki

Personally, I never run a production box without serial console access. I am testing the XenEnterprise XenServer 5 product, and could not find instructions for enabling the serial console. Well, it's Xen and Linux, right? I'm not the brightest guy in the room, but I'm no dummy. below is what I did:

first, I looked about for instructions. I found http://support.citrix.com/article/ctx116181 which is instructions on how to do this with xenserver 3, but xenserver5 uses extlinux, not grub, so clearly that would not work. I did some digging on extlinux, and turns out it's config is about the same as syslinux.

first /boot/extlinux.cfg needs to be adjusted:

SERIAL 0 115200                                                                 
default xe                                                                      
prompt 1                                                                        
timeout 50                                                                      
                                                                                
label xe                                                                        
  # XenServer                                                                   
  kernel mboot.c32                                                              
  append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M com1=115200,8n1 \
console=com1 --- /boot/vmlinuz-2.6-xen root=LABEL=root-jhawazvh ro console=ttyS0,115200n8 --- \
/boot/initrd-2.6-xen.img                        

or if you prefer a diff:

*** /boot/extlinux.conf.bak	2009-05-16 19:52:32.000000000 -0700
--- /boot/extlinux.conf	2009-05-16 20:07:34.000000000 -0700
***************
*** 1,3 ****
--- 1,4 ----
+ SERIAL 0 115200 
  default xe
  prompt 1
  timeout 50
***************
*** 5,11 ****
  label xe
    # XenServer
    kernel mboot.c32
!   append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M console=/dev/null vga=mode-0x0311 --- /boot/vmlinuz-2.6-xen root=LABEL=root-jhawazvh ro quiet vga=785 splash --- /boot/initrd-2.6-xen.img
  
  label fallback
    # XenServer (Xen 3.2.1 / Linux 2.6.18-92.1.10.el5.xs5.0.0.426.647xen)
--- 6,12 ----
  label xe
    # XenServer
    kernel mboot.c32
!   append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M com1=115200,8n1 console=com1 --- /boot/vmlinuz-2.6-xen root=LABEL=root-jhawazvh ro console=ttyS0,115200n8 --- /boot/initrd-2.6-xen.img
  
  label fallback
    # XenServer (Xen 3.2.1 / Linux 2.6.18-92.1.10.el5.xs5.0.0.426.647xen)

the /etc/inittab (remember, this is pretty much CentOS) is already prepared with the proper getty on ttyS0... no need to change it, but I've listed it below just because:

s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux