Skip to content

trixbox 2.8 Xen fix/install

[ad#engineertim-blog]

For this to work, you need to have the install media for CentOS, I use the CentOS 5.3 i386 DVD. You should also have a read the trixbox-xen.pdf on this site.

CentOS specific stuff we need to do.
mount -oloop CentOS-5.3-i386-bin-DVD.iso /var/www/html/centos

make sure this is browsable in a web browser. You will need to be able to serve the installer these files.

We need to copy off the vmliuz and initrd.img from the images/xen folder for our use during the install. I like to serve all of my xen specific stuff from a nfs mount so that I can access these files from different xen servers without issues. How you do it is up to you. These files MUST be accessible by the computer that is going to boot the Xen DomU for trixbox28. For ease of following this doc, I will user /srv/xen/trixbox28 as my directory for these files.

mkdir /srv/xen/trixbox28
cd /var/www/html/centos/images/xen
cp initrd.img vmlinuz /srv/xen/trixbox28/

Trixbox Specific Repo Setup.
mkdir /var/www/html/trixbox
We have to create a trixbox folder to serve the rpms from for the installer.

mkdir /mnt/iso
mount -oloop trixbox-2.8.0.iso /mnt/iso

We need to mount the trixbox-2.8.0 iso so we can get the rpms and the comps.xml file off.

cd /mnt/iso/trixbox
cp *.rpm /var/www/html/trixbox/

Now we need to grab the comps.xml file for making the trixbox repo on our web server.
cd /mnt/iso/repodata
cp comps.xml /var/www/html/trixbox/
cd /var/www/html/trixbox/

We need to add a couple of rpms to our new trixbox repo for xen. This will ensure the xen kernel and dahdi kmod files will work right out of the box. Make sure you are in /var/www/html/trixbox when doing the wget. Please also make sure to use your closest mirror by going to http://www.centos.org/modules/tinycontent/index.php?id=30

wget http://mirror.nic.uoregon.edu/centos/5.3/updates/i386/RPMS/kernel-xen-2.6.18-128.1.10.el5.i686.rpm
We also need the kmod-dahdi from the trixbox repo.
wget http://yum.trixbox.org/trixbox/2.8/test/kmod-dahdi-linux-xen-2.2.0-4_trixbox.2.6.18_128.1.10.el5.i686.rpm

Now lets create our repo for our installer.
createrepo -g ./comps.xml ./
if the createrepo is not found, install it with yum and try again.
yum -y createrepo

Now we create our install file. I call mine trixbox28.install, the contents are listed below. Yours may differ. Of particular note is the kernel, ramdisk, and ks=http://192.168.1.216/trixbox.ks lines. The file trixbox.ks is our kickstart file, which we will have to make changes to from my original one in my xen guide.

kernel = “/srv/xen/trixbox28/vmlinuz”
ramdisk = “/srv/xen/trixbox28/initrd.img”
extra = “text ks=http://192.168.1.216/trixbox.ks”
name = “trixbox”
memory = “512”
disk = [ ‘tap:aio:/srv/xen/trixbox.img,xvda,w’, ]
vif = [ ‘bridge=xenbr0’, ]
vcpus=1
on_reboot = ‘destroy’
on_crash = ‘destroy’

Save this file in /etc/xen/

Now we need to edit the trixbox.ks file or ks.cfg from my trixbox-xen guide. We need to change the first line for the url to now point to our centos install media.
url –url http://192.168.1.216/centos
please make sure to use the ip address for your web server that is serving the centos install media.

We also need to add one additional repo (trixbox) to the trixbox.ks file. This is done with the repo line. Add this just before the %packages statement in the trixbox.ks file. Be sure to change the IP address and path to reflect the trixbox repo we created from above. We also need to add the kmod-dahdi-linux-xen so it gets installed and not install the kmod-dahdi-linux package.

#Add the repo information
repo –name=trixbox –baseurl=http://192.168.1.216/trixbox/
%packages
@Core
@Trixboxcore
kernel
kernel-xen
#add kmod-dahdi-linux-xen
kmod-dahdi-linux-xen
#remove the one for the other kernel so they don’t conflict possibly
-kmod-dahdi-linux
postfix
-sendmail

Now save your trixbox.ks or ks.cfg file with these changes.

Now start the install process for trixbox28.
xm create -c trixbox28.install

Your installer should start and ask you for your local as well as a password for root.

You may, more than likely, see a few error messages fly by when the installer starts going. These are ok to ignore.

Once the install has finished it will shutdown and you will need to start it with your actual trixbox28 xen config. Mine is listed below, again yours might differ.

name = “trixbox28”
memory = “512”
disk = [ ‘tap:aio:/srv/xen/trixbox.img,xvda,w’, ]
vif = [ ‘bridge=xenbr0’, ]
bootloader=”/usr/bin/pygrub”
vcpus=1
on_reboot = ‘restart’
on_crash = ‘restart’

You should see no errors with dhadi,
Starting dahdi: Loading DAHDI hardware modules:
wct4xxp: [ OK ]
wcte12xp: [ OK ]
wct1xxp: [ OK ]
wcte11xp: [ OK ]
wctdm24xxp: [ OK ]
opvxa1200: [ OK ]
wcfxo: [ OK ]
wctdm: [ OK ]
wcb4xxp: [ OK ]
wctc4xxp: [ OK ]
xpp_usb: [ OK ]

No hardware timing source found in /proc/dahdi, loading dahdi_dummy
Running dahdi_cfg: [ OK ]

Firstboot scripts will run and you should be good to go.
Let me know any issues, questions or concerns either by email by posting a comment.