Elastix and Xen on Centos5.1

Joined
May 14, 2008
Messages
7
Points
0
Has anyone managed to get Elastix working on Xen. I have an IBM X345 with 4GB Ram 2x 3.2G Xeon. Currently running 3 Centos 5.1 machines. I want to run Elastix in a fourth Xen machine, but I can either 1) not get it to install or 2) get it to install and on reboot after install I get Kernel panic and an endless reboot/panic cycle. I Suspect it is something to do with hardware probing/driviers for cards etc.

I would appreciate any ideas anyone has or maybe a kickstart file that disables any hardware related probing, card drivers etc.

Cheers Spart
 
Joined
Oct 24, 2007
Messages
25
Points
0
Hi,

Elastix work very well on XEN-3.1 oer XEN-3.2 the only problem is 'ztdummy'. Actually this driver doesn't provide a good zaptel timer for asterisk and bring Elastix alway to crash at the first boot secuense after the instalation. A workaround is to avoid that zaptel kernel module will be loaded during the boot by presing 'I' and get in iteractives modus once your domU is started. After that you should edit line #206 in '/etc/init.d/zaptel'

Code:
Before:
 modprobe ztdummy 2> /dev/null
After:
# modprobe ztdummy 2> /dev/null
   modprobe -V
This will avoid that 'ztdummy' will be loaded during the boot time.
if you don't have any Digium Hardwre available you can put in a free PCI slot in your motherboard a clone of Digium card like this:
http://www.x100p.com/products/FXO.php

As paravirtualized machine you can passthrough this card to Elastix.
My XEN virtual Elaxtix works very stable and with a good sound quality toghether with other six XEN appliances:

xentop - 22:42:19 Xen 3.1.0
8 domains: 1 running, 7 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown
Mem: 8322364k total, 7346944k used, 975420k free CPUs: 2 @ 2000MHz
NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR SSID

Domain-0 -----r 2984 21.3 1024000 12.3 no limit n/a 2 4 12461 476627 0 0 0 0 0

ELASTIX1 --b--- 236 1.6 1024000 12.3 1024000 12.3 1 1 9667 474 2 0 4798 24736 0

WIN2K3R2 --b--- 324 1.0 1032064 12.4 1040384 12.5 1 1 21 121 2 0 0 0 0

ENDIAN22 --b--- 99 0.1 512000 6.2 512000 6.2 1 3 4909 10768 4 0 2903 7176 0

CLARKCONN --b--- 215 0.8 1024000 12.3 1024000 12.3 1 1 45 278 2 0 3802 16819 0

MYTHBUNT --b--- 141 0.7 1024000 12.3 1024000 12.3 1 1 467672 12051 3 0 17076 8167 0

SOLARIS --b--- 133 0.6 1048576 12.6 1048576 12.6 1 1 1 0 1 0 10170 1302 0

DOCOMINO --b--- 14 0.0 512000 6.2 512000 6.2 1 1 16 93 2 0 1914 4754 0
And that is the performance of this clone card 'X100P' in the Elastix1 DomU:

[root@elastix1 ~]# zttest
Opened pseudo zap interface, measuring accuracy...
99.798729% 99.999413% 99.991516% 99.997948% 99.508202% 99.897171% 99.604591%
99.995316% 99.605957% 99.995316% 99.309563% 99.997269% 99.701462% 99.898056% 99.895905%
99.996880% 99.995789% 99.994431% 99.409378% 99.702629% 99.507713% 99.896873% 99.702240%
99.995125% 99.996780% 99.896774% 99.995506% 99.702248% 99.995506% 99.995300% 99.994720%
99.995316% 99.899124% 99.701271% 99.995613% 99.702438% 99.995613% 99.896683% 99.995018%
99.702332% 99.995697% 99.995399% 99.994339% 99.800491% 99.895706% 99.606445% 99.994148%
--- Results after 47 passes ---
Best: 99.999 -- Worst: 99.310 -- Average: 99.854041, Difference: 100.145934
Hopefully you can use this information to setup your virtual Elaxtis under XEN.
Rikolen<br><br>Post edited by: rikolen, at: 2008/05/21 07:43
 
Joined
May 14, 2008
Messages
7
Points
0
Hi,

Thank you for the reply, I expected it to be something to do with zaptel. I cannot seem to get interactive mode to work when accessing my Xen machine through putty or through a terminal on the machine itself as xm console pbx. It just ignores the I key and carries on.

Do you know what changs would need to be made to a kickstart file to take out all of the hardware card stuff as this pbx would be purely VOIP based. I could then install a fresh pbx without the zaptel problems.

Cheers
Spart
 
Joined
May 14, 2008
Messages
7
Points
0
OK, I managed to finally get it to install and after making changes to the zaptel config it boots to the login prompt. When I try to login from a browser I get the login and can login fine. When I try to access the PBX tab (https://192.168.0.xx/?menu=pbxconfig) I get a blank screen and then I cannot login again without clearing the certificates and session cookies.

I have tried the above from multiple clients using different browsers I get the same problem, I cannot accesss the PBX config screens. When I try to access the Extras tab I get the following DB errors:

ERROR DB: Error de conexion a la base de datos - DB Error: extension not found
ERROR DB: Error de conexion a la base de datos - DB Error: extension not found

Any suggestions as to what the problem is, I am really at a loss, apache is running, mysql is running, I have disabled selinux and iptables to ensure this is not a firewall issues of some sort, to no avail. I have been trying to get this to work for 2 weeks now :(

Any help would be appreciated.

Cheers
Spart
 
Joined
May 14, 2008
Messages
7
Points
0
OK, I managed to finally get it to install and after making changes to the zaptel config it boots to the login prompt. When I try to login from a browser I get the login and can login fine. When I try to access the PBX tab (https://192.168.0.xx/?menu=pbxconfig) I get a blank screen and then I cannot login again without clearing the certificates and session cookies.

I have tried the above from multiple clients using different browsers I get the same problem, I cannot accesss the PBX config screens. When I try to access the Extras tab I get the following DB errors:

ERROR DB: Error de conexion a la base de datos - DB Error: extension not found
ERROR DB: Error de conexion a la base de datos - DB Error: extension not found

Any suggestions as to what the problem is, I am really at a loss, apache is running, mysql is running, I have disabled selinux and iptables to ensure this is not a firewall issues of some sort, to no avail. I have been trying to get this to work for 2 weeks now :(

Any help would be appreciated.

Cheers
Spart
 
Joined
Oct 24, 2007
Messages
25
Points
0
Hi Sparticle,

Another way to get the domU started and get full control at the boot time over the CLI is to run this command "xm create <your config domu file in /etc/xen/> -c" and if you use "pygrub" to start your domains you will be able to get in iteractives modus after using the "I".
In the pass I used kikstart files to install Elastix under xen like the enclosed file in this message, maybe you can tweak it a little bit according your configuration including the fix for "ztdummy".
Today I just install Elastix in VMware server (2-3 GB hard disk space, one partition with xen kernel) and when the installation is done and ready for the production, I take a Knoppix iso image and boot in the same virtual mashine and transfer elastix_vmware to my XEN server over the LAN with ssh and dd like this bash script:
# /bin/bash
dd if=/dev/sda1 bs=512 | ssh -o port=22 root@192.168.178.100 'dd of=/dev/LogVol-001/elaxtix1_root bs=512'
Once the transference is done I have to do differents steps in order to get Elaxtix running:

1.- adjust /etc/fstab
/dev/sda1 / ext3 defaults 1 1
/dev/sda2 swap swap defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm mpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
2.- adjust xen console in /etc/inittab
# Run gettys in standard runlevels
co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav
#1:2345:respawn:/sbin/mingetty tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
3.- adjust network files
/etc/resolv.conf; /etc/hosts; /etc/sysconfig/network-script/ifcfg-eth0
4.- to avoid problem with Libc6 library.
echo "hwcap 0 nosegneg" >> /etc/ld.so.conf.d/libc6-xen.conf
5.- /boo/grub/menu.lst
default=0
timeout=4
title CentOS (2.6.18-8.el5xen)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-8.el5xen ro root=/dev/sda1 xencons=xvc console=xvc0 ignorebiostables max_loop=32 noirqbalance fastboot nopcmcia ide=nodma noide apm=off acpi=off apic=off pnpacpi=off 3
initrd /boot/initrd-2.6.18-8.el5xen.img
6.- Some time a new initrd.img is needed to boot the Elastix domU properly
/sbin/mkinitrd --with=xennet --preload=xenblk /boot/initrd-2.6.18-8.el5xen.img 2.6.18-8.el5xen
Now Elastix is ready to boot into our XEN server the config file look like this:
name = "ELASTIX1"
memory = "700"
disk = [ 'phy:/dev/backup/elax11_root,sda1,w',
'phy:/dev/backup/elax11_swap,sda2,w', ]

vif = [ 'bridge=xenbr0, mac=00:16:3e:6d:f0:d1', ]

root = '/dev/sda1 ro'

UUID = "9ec144aa-1248-cc80-777f-85bd73d8dc68"
bootloader="/usr/bin/pygrub"

#Communication controller: Motorola Wildcard X100P
pci = ['0000:01:07.0']

vcpus=1
on_reboot = 'restart'
on_crash = 'destroy'
on_poweroff = 'destroy'

extra = 'clock=jiffie xencons=xvc console=xvc0 ignorebiostables max_loop=32 noirqbalance fastboot ide=nodma apm=off acpi=off apic=off video=xenfb 3'
In my Ubuntu 8.04 Server "Dom0" I hided the pci card in the "/boot/grub/menu.lst"
so:
title Xen 3.2 / Ubuntu 8.04, kernel 2.6.24-16-xen
root (hd0,0)
kernel /xen-3.2.gz dom0_mem=1000M
module /vmlinuz-2.6.24-16-xen root=/dev/mapper/ubuntu-ubuntu_root ro console=tty0 pciback.hide=(0000:01:07.0) quiet splash
module /initrd.img-2.6.24-16-xen
If I didn't forget nothing Elastix will boot without any problem. Try this methode and let me know if it's work for you. In regard to the DB errors I never got this issues under XEN.
Code:
#platform=x86, AMD64 oder Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5 
# Use text mode install
text
# Firewall configuration
firewall --disabled
firstboot --disable
# System keyboard
keyboard de-latin1-nodeadkeys
# System language
lang de_DE
# Root password
rootpw --iscrypted $1$F7WWO2Qf$p1Cx7EV7ED0BvCa7nBMlkz.
# SELinux configuration
selinux --enforcing
# Do not configure the X Window System
skipx
# Upgrade existing installation
upgrade
# Installation logging level
logging --level=debug
# Use NFS installation media
nfs --server=192.168.178.231 --dir=/opt/share
# Network information
network --bootproto=static --device=eth0 --gateway=192.168.178.001 --ip=192.168.178.001 --nameserver=194.97.173.125 --netmask=255.255.255.0 --onboot=on
# System timezone
timezone  Europe/Berlin
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel 
# Disk partitioning information
part / --fstype="ext3" --ondisk=xvda --size=2048 --bytes-per-inode=4096

%post
echo "NETWORKING=yes" > /etc/sysconfig/network
echo "HOSTNAME=elastix.localdomain.com" >> /etc/sysconfig/network

echo "# Do not remove the following line, or various programs" > /etc/hosts
echo "# that require network functionality will fail." >> /etc/hosts
echo "127.0.0.1		localhost.localdomain localhost" >> /etc/hosts
echo "192.168.178.002		elastix.localdomain.com" >> /etc/hosts

echo "driftfile /var/lib/ntp/drift" > /etc/ntp.conf
echo "server 0.pool.ntp.org" >> /etc/ntp.conf
echo "server 1.pool.ntp.org" >> /etc/ntp.conf
echo "server 2.pool.ntp.org" >> /etc/ntp.conf
echo "server 127.127.1.0" >> /etc/ntp.conf
echo "fudge 127.127.1.0 stratum 10" >> /etc/ntp.conf

cp -f /boot/grub/grub.conf /boot/grub/grub.conf.old
sed -e "s/hiddenmenu/#hiddenmenu/" /boot/grub/grub.conf.old > /boot/grub/grub.conf

cp -f /boot/grub/grub.conf /boot/grub/grub.conf.old2
sed -e "s/default=0/default=1/" /boot/grub/grub.conf.old2 > /boot/grub/grub.conf

eject
%packages
Rikolen<br><br>Post edited by: rikolen, at: 2008/05/23 09:48
 
Joined
Nov 15, 2007
Messages
93
Points
0
To hide pci devices to dom0 at boot time(pciback.hide=(0000:01:07.0)), is necessary to compile de kernel with some option or the default kernel can do this?

Thanks again.
 
Joined
Oct 24, 2007
Messages
25
Points
0
Hi,
yes,the default kernel can hide PCI devices. I didn't compile any kernels
rikolen.<br><br>Post edited by: rikolen, at: 2008/05/23 20:27
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,993
Messages
131,109
Members
17,716
Latest member
Orbit114
Top