User Tools

Site Tools


virtualization:openvz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualization:openvz [2012/08/25 17:59]
gcooper
virtualization:openvz [2012/08/31 14:46] (current)
gcooper
Line 24: Line 24:
  
 ===== PBX ===== ===== PBX =====
 +
 +http://tutorialsbay.com/how-to-isntall-asterisk-freepbx-on-a-vps/
  
 See [[voice:pbx:piaf_virtual|PiaF]]. See [[voice:pbx:piaf_virtual|PiaF]].
Line 32: Line 34:
  
 http://www.cadvision.com/blanchas/Asterisk/ZaptelPerformanceTesting.html http://www.cadvision.com/blanchas/Asterisk/ZaptelPerformanceTesting.html
 +
 +==== Firewall ====
 +
 +We run the firewall on the Host Node (HN).
 +
 +Stop all running VMs.
 +
 +<file>
 +sed -i 's|ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length|ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp|' /etc/vz/vz.conf
 +
 +/etc/init.d/vz restart
 +</file>
 +
 +==== DAHDI ====
 +
 +Sangoma USB hardware timing source (internal UT50 and external UT51): 
 +
 +http://sangoma.com/products/accessories/tools.html
  
 :!: Note that DAHDI will only work if the Host Node and the VE are the same $ARCH (32/32 or 64/64). :!: Note that DAHDI will only work if the Host Node and the VE are the same $ARCH (32/32 or 64/64).
Line 47: Line 67:
 </file> </file>
  
-Add ''clocksource=hpet'' to the kernel boot line:+Change the current clock source, test then add to ''rc.local'':
  
 <file> <file>
-vi /etc/default/grub +echo hpet > /sys/devices/system/clocksource/clocksource0/current_clocksource
- +
-GRUB_CMDLINE_LINUX_DEFAULT="quiet clocksource=hpet"+
 </file> </file>
  
  
 See also 'res_timing_timerfd'. See also 'res_timing_timerfd'.
- 
-==== DAHDI ==== 
  
 <file> <file>
 dmesg | grep dahdi dmesg | grep dahdi
 +
 +dahdi_test
 </file> </file>
 +
 +Acceptable score: >99.975
 +
 +=== Make DAHDI Timing Available to CTs ===
 +
 +This assumes Asterisk is running as the user 'asterisk'.
 +
 +<file>
 +CTID=100
 +vzctl stop $CTID
 +vzctl set $CTID --devnodes dahdi/pseudo:rw --save
 +vzctl start $CTID
 +vzctl exec $CTID chown -R asterisk.asterisk /dev/dahdi /lib/udev/devices/dahdi
 +</file>
 +
 +=== Alternate Method? ===
 +
 +You can export devices from the Hardware Node (HN) to the container (CT) by using the devnodes flag.
  
 You may need a line like this in the /etc/vz/conf/VEID.conf for the Asterisk VE: You may need a line like this in the /etc/vz/conf/VEID.conf for the Asterisk VE:
Line 72: Line 108:
 ===== Templates ===== ===== Templates =====
  
-OpenVZ containers are created from templates.  Since containers are not fully virtualized environments, there is no booting to CD/DVD drives or ISO images.+OpenVZ containers are created from templates.  Since containers are not fully virtualized environments.  There is no booting to CD/DVD drives or ISO images.
  
 ==== Creating Templates ==== ==== Creating Templates ====
Line 84: Line 120:
 ==== Create a FreePBX (Centos 5) Template on Proxmox ==== ==== Create a FreePBX (Centos 5) Template on Proxmox ====
  
-Install your Centos server and application to a physical machine.+  - Install your Centos server and application to a physical machine
 +  - Create a Centos 5 container using an existing Centos template and shut it down.
  
-Create a Centos 5 container using an existing Centos template and shut it down.+=== Physical Machine (Source) ===
  
-Log into the Proxmox host.+Clean out the YUM database and stop running applications: 
 + 
 +<file> 
 +yum clean all 
 + 
 +amportal stop 
 +service dnsmasq stop 
 +service httpd stop 
 +service mysqld stop 
 +</file> 
 + 
 +=== Proxmox Host ===
  
 <file> <file>
Line 212: Line 260:
  
  
 +Using ''tar'' instead of ''rsync'':
  
 +<file>
 +vim /etc/exclude
 +
 +.bash_history 
 +lost+found 
 +/dev/
 +/mnt/
 +/tmp/
 +/proc/
 +/sys/
 +/usr/src/*
 +</file>
 +
 +<file>
 +tar --numeric-owner -czvf /tmp/centos-5.0-x86_64-FreePBX-image.tar.gz -X /tmp/exclude /
 +
 +scp /tmp/centos-5.0-x86_64-FreePBX-image.tar.gz root@192.168.1.30:/var/lib/vz/template/cache/
 +</file>
  
  
virtualization/openvz.1345939191.txt.gz · Last modified: 2012/08/25 17:59 by gcooper