support

Trixbox on XenSource Enterprise CentOS VM

zylantha
Posts: 7
Member Since:
2007-03-01

This post details a "howto" and "my experience" installing Trixbox 2.2.3 into a Centos 4.5 VM under XenSource 3.2.

I've created this because I fell into a few "d'oh!" holes along the way and I thought somebody else might find this info useful. There are also some problems (bugs?) with the trixbox install script that you need to get around.

It's aimed at somebody who knows what they're doing and I make no apologies for this not being detailed enough for induhviduals to follow.

Method:

  1. Install XenSource XenServer 3.2
  2. Buy the XenSource Centos 4.4 template from http://shop.tygerteam.com/ and install as per the instructions
  3. Install a new VM based on the Centos 4.4 template. I used 512MB RAM but the default hard disk size. At the end of the install it's 50% used.
  4. (optional) update the repository to point to your ISP's centos mirror (iinet in my case)
  5. Run "yum update" to upgrade it to Centos 4.5
  6. Delete /etc/localtime and create a proper symlink from /usr/share/zoneinfo
  7. Update the root password
  8. Reboot and make sure it starts up as Centos 4.5. If you like you can switch it off and then clone it or export it from here so you have a Centos 4.5 image that you can use it again later without having to redo the other steps
  9. Boot it up again and run netconfig to configure networking, then restart the network service
  10. Edit /etc/sysconfig/network and fix the hostname
  11. Extract the trixbox.tar.gz from trixbox-2.2.3-1.iso and scp it up to your VM
  12. Untar trixbox.tar.gz to /var/trixbox_load (make the directory)
  13. Copy rpms/*.repo to /etc/yum.repos.d (trixbox's install script will do this later but it seems that it omits to install asterisk so you need to do this manually first)
  14. Install asterisk and asterisk-addons (yum install asterisk asterisk-addons)
  15. run install.sh from /var/trixbox_load
  16. Edit /etc/php.ini and turn 'display_errors' off (trixbox's install script changes this for some stupid reason)
  17. Edit /etc/hosts and add your hostname and IP in
  18. Edit /etc/httpd/conf/httpd.conf and set the hostname (you may not need to do this depending on your dns configuration)
  19. Reboot and trixbox should now be working properly

I will follow up with more details of my experience later... in particular I'm keen to see if Trixbox under Xen has the same high-res timer issues that Trixbox under VMWare has (which is the cause of garbled asterisk-generated messages that has been widely reported)



zylantha
Posts: 7
Member Since:
2007-03-01
Following up on my previous

Following up on my previous post, I'm pleased to report that there are no choppy audio issues with Trixbox in this configuration on XenServer.

I have also successfully configured chan_skype (although it wasn't easy) and it is also working with no audio problems.

If anybody is really stuck with chan_skype configuration I'll post a follow-up guide, but it has been discussed elsewhere to some extent already.

FYI the configuration of this server -
Compaq Evo D51C Pentium 4 2.4GHz w/ 1GB RAM running XenServer Enterprise 3.2
Trixbox 2.2.3



iverona
Posts: 95
Member Since:
2006-10-23
Hi zylantha, why did you

Hi zylantha,

why did you choose XenSource instead of the open-source Xen, or other alternatives such as VMWare Server, I mean, which are the pros&cons of each one (I'm sure you did a study about all the possibilities).

Yesterday I've just installed a not so powerful machine (AMD 1800, 1.5Gb RAM) with linux and vmware server. I'm running two VMs, one for trixbox and other one for m0n0wall (firewall, QoS...). So far I'm very pleased with the results, but still a lot of testing is needed.



zylantha
Posts: 7
Member Since:
2007-03-01
XenSource vs Xen vs VMWare?

I currently use VMWare as well, to host my ClarkConnect server which is roughly equivalent to your M0n0wall. But I'm not over-the-moon with it (haha)

My main server is an AMD64 3800 X2 with 2GB RAM which runs Gentoo with 3+ DVB-T cards and MythTV, along with hosting 2TB+ of video and other data. Using VMWare I thought I could have one VM running ClarkConnect to create a DMZ (including serving web and maill services) and a second VM running Trixbox.

The first problem I found with running Trixbox in VMWare was that any time-critical server-based operations, e.g. playing audio cues for voicemail, would be completely screwed up and unintelligible. This also extended to chan_skype being unusable. After a lot of work, including moving that VM between three different Linux servers and two different Windows PCs, I deduced that the problem was because the high-res timer did not work properly under VMWare, and it's well-documented that this is a problem. Often the official solution is "install VMWare tools" but this only fixes the problem of the system clock losing time - not real-time applications losing the plot.

So my Trixbox got moved off the VMWare and onto the dedicated P4 2400 ... until I put XenEnterprise on it as I described above.

So that's why not VMWare for Trixbox ... so why not VMWare for ClarkConnect? ... well ClarkConnect works "OK" under VMWare on Gentoo, but it has its quirks. For example I just upgraded VMWare Server today from 1.0.2 to 1.0.3 and then everything stopped working with stupid undocumented errors. I spent half and hour without a firewall (or internet connectivity for my s.o.!) before I downgraded and got it back up and working - still not fully understanding why it suddenly stopped working under the minor upgrade. VMWare is great, don't get me wrong, but it's got its own quirks stemming from its reliance on the Linux host (and there's still that problem with the system clock losing time ...). I've also had some problems with that main server, because it has so much hanging off it, with random hangs without so much as a kernel panic... I've just had another one today which seems to be because of its 1-wire USB interface ... I've had other strange hangs that I thought were due to the Quickcam Orbit camera. Maybe it's a dodgy USB interface, I don't know...

Then there's why XenEnterprise rather than Xen Free. That's more difficult to explain. Let's start by clarifying that I'm using the "free" XenExpress version of XenEnterprise, which is exactly the same as all the other products from XenSource, just that you don't activate it using a registration key, you're limited to 4 VMs on one box, 2 CPU sockets and 4GB of memory. For me it's "so what" I'm not going to get anywhere near those limits. So the cost of XenEnterprise is the same as Xen Free for this comparison purpose.

I played with Xen Free a while back, but to do so you still need to decide upon and build a Dom0 environment, Xen isn't like VMWare Enterprise where you install it on bare-metal. So, what's your Dom0 going to be? SuSe (which is Xen-ready already)? I tried that ages ago, didn't like it. I also tried a few other distros that didn't take my fancy. I'm a Gentoo-enthusiast at heart, but I learned quickly that Gentoo really isn't Xen friendly at all. I also learned that learning Xen meant learning yet another complex command-line interface to do the things that, in VMWare, are all menu-based and GUI-driven (like switching between VMs and stopping and starting VMs). I like my command-lines to manipulate files and manage things within a system, but to manage virtual servers .... it was getting a bit much.

Then I looked at XenSource - all the benefits of Xen, with none of the command-line horridness, but all of the niceties of VMWare management built in, with a platform-independent management console. The original problem for me with XenSource was the very limited VM support (Redhat - haven't used that since my uni days, and Debian - haven't used that since I was running Linux on my Xbox, and don't care to relearn it). No sign of being able to run Trixbox at all.

I became aware that a CentOS template was released for XenSource quite a while ago, but never had the opportunity (or a free server) to try it out and see if it could be made to run Trixbox, until this last week while I've been stuck at home with the flu. So I did. And found that it works, and it doesn't have the high-res timer issues that I encountered under VMWare, so all is good. With all the other issues I've been having with my ClarkConnect server under VMWare at the moment, I've been very tempted to do some more work and move that over to the Xen server as well, but we'll see ...

I'd be very interested to know if you have really tested Trixbox under VMWare fully, with system-generated sounds and not just pass-through SIP calls. I had only tried this at the time with Trixbox 2.0 but I know a lot of other people have had these problems as well...

One other interesting thing that is happening in the ClarkConnect world is that Asterisk is being integrated into the next version. Not sure how it will compare with Trixbox, but it will undoubtedly include FreePBX and given the awesome power already included in ClarkConnect it is going to be a killer all-in-one server solution, and there will be very little that you would need in a home server that ClarkConnect won't be able to provide!



iverona
Posts: 95
Member Since:
2006-10-23
Thank you very much for your

Thank you very much for your answer. I did not know about XenSource before reading your post, and it’s a very interesting piece of software. I've been using Xen before, but VmWare server is definitely beyond in terms of ease of use.

The only thing I see about Xen is that you are stuck to using OSs that can be paravirtualized, or you must use a CPU with VT extensions. So, for example, I'll not be able to use m0n0wall which is based on FreeBSD.

About Asterisk on vmWare: I've actually not tested it very much, because this weekend I've been mostly testing the network capabilities and playing with my router and the firewall under vmware. I'll give asterisk a test this week, but I a lot of people is having problems, I will probably have it as well.



zylantha
Posts: 7
Member Since:
2007-03-01
There are Xen-compatible

There are Xen-compatible kernels for FreeBSD available (see e.g. http://txrx.org/xen/).

However there are no XenEnterprise templates released for FreeBSD, probably because there's not enough call for them (talk to the guys at Tygerteam if you really want them - it can be done! Or you can build one yourself!).

From my perspective, anything that m0n0wall can do, a linux-based firewall can do, and take it from somebody who has used Smoothwall for many many years, ClarkConnect is pretty damn good as a firewall and can probably do anything that m0n0wall can do. I'm pretty confident if you set your mind to it and have the skills you could get ClarkConnect running under Xen. I just don't have the drive at the moment to do it. It can definitely run under VMWare (and they are planning to release a VM image for it as well ...)



foxyguitarman
Posts: 41
Member Since:
2007-08-02
cool, Thanks for your posts

cool, Thanks for your posts guys. I also have never heard of this Xen software. I'll check it oat.

"I press on toward the goal to win the prize for which God has called me heavenward in Christ Jesus." Philippians 3:14



dixon1e
Posts: 2
Member Since:
2007-04-26
Trixbox 2.2 on Xen - results

Has anyone made the CentOS image work on Xen yet?

In particular, I have a Ubuntu server running Xen I would like to try this on, but I have no experience with Xen image making for CentOS. From reading above, I see Xensource has templates for CentOS 4.5. Are these needed with Xen?



llehtonen
Posts: 4
Member Since:
2007-05-30
My Xen Progress

I have a Zaptel card working in a Xen domU on Debian Etch.

I had to modify /boot/grub/menu.lst to have dom0 ignore the Zaptel card on 08:0a.0 (with the option "pciback.permissive pciback.hide=(08:0a.0)".

I had to hand the domU control of the card in its .cfg file with the following line:
pci = ['08:0a.0']

I have Asterisk 1.4 on Debian Unstable using the card in a domU.

My next step is to get this working with trixbox, but rpmstrap is horrible, and I thus far have not had good luck with rinse.

---
Lars Lehtonen



zylantha
Posts: 7
Member Since:
2007-03-01
Xen vs Xensource (Templates)

You don't need templates for Xen, the templates are only for XenSource.

XenSource (XenServer / XenEnterprise) is a commercial version of Xen, for which there is a free version you can download and run up to 4 VMs (any more and you have to pay).

XenSource does not run on any particular platform, it has its own Linux-based Dom0 that it installs, and then you run your own DomUs under it - but to do so you need the templates that are provided with it or which you develop yourself or buy.

For Xen, in comparison to XenSource, you are "on your own" as far as getting a build for a DomU is concerned. Usually you would build a DomU based on the Dom0 distribution you are using but it's not nearly as easy as with XenSource (at least for those DomUs that XenSource provides a built-in template for anyway; although anybody who knows a shell could install the templates you buy and download)

(btw XenSource also has a very nice GUI management system that runs on Java and is in some respects equivalent to the VMWare Enterprise console - doesn't have all the features but makes it very easy to manage your DomUs especially compared to Xen)



robclay
Posts: 2
Member Since:
2007-10-04
Why 4.4?

Thanks for a helpful article!

Question, why did you choose the 4.4 CentOS and then upgrade to 4.5 as opposed to choosing CentOS 5.0?

Thanks,
Robert



zylantha
Posts: 7
Member Since:
2007-03-01
I used 4.4 to get to 4.5,

I used 4.4 to get to 4.5, because that is what Trixbox used at the time (4.5).

I'm not even sure if the next version of Trixbox that might be available now uses CentOS 5.0 yet, but after my investigations I can see there's no real reason why you can't use 5.0.

Indeed using 5.0 would solve some difficulties that you end up with if you try to use chan_skype (in that the currently available versions of Skype do not support the older libraries that are in CentOS 4.5).

I was also using the previous version of XenServer ... the new version of XenServer is now available, and it's very very cool - you no longer need to buy the templates to install CentOS as it supports it out-of-the-box (although I haven't tried a fresh install, as the current VMs that I created in XenServer 3 seemed to upgrade just fine).



robclay
Posts: 2
Member Since:
2007-10-04
Thanks!

I have a xenserver enterprise edition 4, and will try the install on a 5.0 CentOS.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.