Elastix and Xen on Centos5.1

Discussion in 'General' started by sparticle, May 21, 2008.

  1. sparticle

    Joined:
    May 14, 2008
    Messages:
    7
    Likes Received:
    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
     
  2. rikolen

    Joined:
    Oct 24, 2007
    Messages:
    25
    Likes Received:
    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:

    And that is the performance of this clone card 'X100P' in the Elastix1 DomU:

    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
     
  3. sparticle

    Joined:
    May 14, 2008
    Messages:
    7
    Likes Received:
    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
     
  4. sparticle

    Joined:
    May 14, 2008
    Messages:
    7
    Likes Received:
    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
     
  5. sparticle

    Joined:
    May 14, 2008
    Messages:
    7
    Likes Received:
    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
     
  6. Usuarioforum

    Joined:
    Nov 15, 2007
    Messages:
    93
    Likes Received:
    0
    Rikolen:

    How do you can passthrough the card to Elastix?

    Thanks
     
  7. rikolen

    Joined:
    Oct 24, 2007
    Messages:
    25
    Likes Received:
    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:
    Once the transference is done I have to do differents steps in order to get Elaxtix running:

    1.- adjust /etc/fstab
    2.- adjust xen console in /etc/inittab
    3.- adjust network files
    4.- to avoid problem with Libc6 library.
    5.- /boo/grub/menu.lst
    6.- Some time a new initrd.img is needed to boot the Elastix domU properly
    Now Elastix is ready to boot into our XEN server the config file look like this:
    In my Ubuntu 8.04 Server "Dom0" I hided the pci card in the "/boot/grub/menu.lst"
    so:
    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
     
  8. Usuarioforum

    Joined:
    Nov 15, 2007
    Messages:
    93
    Likes Received:
    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.
     
  9. rikolen

    Joined:
    Oct 24, 2007
    Messages:
    25
    Likes Received:
    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
     

Share This Page