[CentOS] xen serial port access for domu?

Sun Mar 29 00:31:32 UTC 2009
Gordon McLellan <gordonthree at gmail.com>

Is serial port "passthrough" possible for the version of xen that
ships with centos 5.2?

I've disabled the xen hypervisor serial console, and can see the
serial port in dom0.  I've masked out the 8250, 8250_pnp and
serial_core modules on dom0 and rebooted.  xm create domain
fails with the error that exactly 4 arguments are required and
only 3 were given.

Steps I followed:

1) I have xencons=off as a kernel arg for dom0, and when dom0 boots,
it finds the serial port.

2) I have blacklisted 8250, 8250_pnp and serial_core, rebooted, no
serial port under dom0

3) added the following to my domu config (domu is 32bit centos 5.2, pvm)
addirq = [ 4 ]
ioports = [ "3f8-3ff" ]

4) now to start the vm and see what happens:
# xm create mythserver
Using config file "./mythserver".
Error: function takes exactly 4 arguments (3 given)

My host is 64 bit centos 5.2, domu is 32 bit centos 5.2. I'm running
the stock redhat version of xen that ships with el5.2

Any suggestions?

-Gordon

# uname -a
Linux xenmaster.dimension-x.local 2.6.18-92.1.22.el5xen #1 SMP Tue Dec
16 12:26:32 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

# xm log
[2009-03-28 18:09:41 xend 8017] ERROR (xmlrpclib2:184) function takes
exactly 4 arguments (3 given)
Traceback (most recent call last):
 File "/usr/lib64/python2.4/site-packages/xen/util/xmlrpclib2.py",
line 162, in _marshaled_dispatch
 response = self._dispatch(method, params)
 File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch
 return func(*params)
 File "/usr/lib64/python2.4/site-packages/xen/xend/server/XMLRPCServer.py",
line 64, in domain_create
 info = XendDomain.instance().domain_create(config)
 File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py",
line 238, in domain_create
 dominfo = XendDomainInfo.create(config)
 File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 205, in create
 vm.initDomain()
 File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 1507, in initDomain
 self.createDevices()
 File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 1716, in createDevices
 self.createDevice(n, c)
 File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 1189, in createDevice
 return self.getDeviceController(deviceClass).createDevice(devconfig)
 File "/usr/lib64/python2.4/site-packages/xen/xend/server/DevController.py",
line 80, in createDevice
 (devid, back, front) = self.getDeviceDetails(config)
 File "/usr/lib64/python2.4/site-packages/xen/xend/server/iopif.py",
line 78, in getDeviceDetails
 allow_access = True)
TypeError: function takes exactly 4 arguments (3 given)

Full pvm config file:
# cat /etc/xen/mythserver
name = "mythserver"
uuid = "f06f3124-0f62-9ea6-ae2e-df597103b5de"
maxmem = 1024
memory = 512
vcpus = 2
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [ "type=vnc,vncunused=1,keymap=en-us" ]
disk = [ "phy:/dev/vg0/xen_mythserver,xvda,w" ]
vif = [ "mac=00:16:3e:0a:bf:d8,bridge=xenbr0" ]
pci = [ "0000:05:02.0","0000:06:08.0","0000:06:09.0" ]
addirq = [ 4 ]
ioports = [ "3f8-3ff" ]

# xm info
host : xenmaster.dimension-x.local
release : 2.6.18-92.1.22.el5xen
version : #1 SMP Tue Dec 16 12:26:32 EST 2008
machine : x86_64
nr_cpus : 8
nr_nodes : 1
sockets_per_node : 2
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 1995
hw_caps :
bfebfbff:20100800:00000000:00000140:040ce33d:00000000:00000001
total_memory : 16382
free_memory : 784
node_to_cpu : node0:0-7
xen_major : 3
xen_minor : 1
xen_extra : .2-92.1.22.el5
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
hvm-3.0-x86_32p hvm-3.0-x86_64
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : unavailable
cc_compiler : gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
cc_compile_by : mockbuild
cc_compile_domain : centos.org
cc_compile_date : Tue Dec 16 11:51:08 EST 2008
xend_config_format : 2