Asterisk DomU

http://www.panticz.de/DomU-Debian-Wheezy

# hide your ISDN card in dom0 and reboot dom0
# sed -i 's|tty0|tty0 pciback.hide=(04:02.0)|g' /boot/grub/menu.lst
# reboot

# in domU
passwd

# install lspci
apt-get install -y pciutils

# OPTIONAL: Diva Server 4BRI-8M 2.0 PCI
http://www.panticz.de/node/342

# apt-get install -y linux-headers-$(uname -r) dpkg-dev

apt-get source linux-image-$(uname -r)

#cd /usr/src/
#tar xzf linux_2.6.24.orig.tar.gz
#ln -s /usr/src/linux-2.6.24.2/ /usr/src/linux
ln -s /usr/src/linux-$(uname -r)/ /usr/src/linux

#mv /etc/apt/sources.list.org /etc/apt/sources.list
#apt-get update
# apt-get install -y linux-ubuntu-modules-$(uname -r)
#apt-get install -y wget build-essential
?? libncurses5-dev

reboot

# old

# set domU name
DOMAIN_NAME=asterisk

# create domU
xen-create-image --hostname=$DOMAIN_NAME --dhcp --mac=00:aa:aa:aa:aa:aa \
--lvm=vg01 --dist=intrepid --mirror=http://archive.ubuntu.com/ubuntu/ --size=4Gb --memory=512Mb --swap=512Mb

# rename config file
mv /etc/xen/$DOMAIN_NAME.cfg /etc/xen/$DOMAIN_NAME

# add to autostart
ln -s /etc/xen/$DOMAIN_NAME /etc/xen/auto

# redirect amv usb card
echo "pci=['04:02.0']" >> /etc/xen/$DOMAIN_NAME

# start domain
xm create -c $DOMAIN_NAME