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/26 13:00]
gcooper
virtualization:openvz [2012/08/31 14:46] (current)
gcooper
Line 34: 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 ==== ==== DAHDI ====
Line 58: Line 70:
  
 <file> <file>
-cat /sys/devices/system/clocksource/clocksource0/current_clocksource+echo hpet > /sys/devices/system/clocksource/clocksource0/current_clocksource
 </file> </file>
  
Line 71: Line 83:
  
 Acceptable score: >99.975 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 can export devices from the Hardware Node (HN) to the container (CT) by using the devnodes flag.
Line 82: 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 94: 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 222: 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.1346007627.txt.gz · Last modified: 2012/08/26 13:00 by gcooper