This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
virtualization:openvz [2012/08/25 15:41] gcooper |
virtualization:openvz [2012/08/31 14:46] (current) gcooper |
||
---|---|---|---|
Line 24: | Line 24: | ||
===== PBX ===== | ===== PBX ===== | ||
+ | |||
+ | http:// | ||
See [[voice: | See [[voice: | ||
http:// | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | ==== Firewall ==== | ||
+ | |||
+ | We run the firewall on the Host Node (HN). | ||
+ | |||
+ | Stop all running VMs. | ||
+ | |||
+ | < | ||
+ | sed -i ' | ||
+ | |||
+ | / | ||
+ | </ | ||
+ | |||
+ | ==== DAHDI ==== | ||
+ | |||
+ | Sangoma USB hardware timing source (internal UT50 and external UT51): | ||
+ | |||
+ | http:// | ||
+ | |||
+ | :!: Note that DAHDI will only work if the Host Node and the VE are the same $ARCH (32/32 or 64/64). | ||
+ | |||
+ | :!: HPET or hardware timing source is important. | ||
+ | |||
+ | Is HN kernel compiled with HPET and am I using it? | ||
+ | |||
+ | < | ||
+ | grep HPET / | ||
+ | |||
+ | cat / | ||
+ | |||
+ | cat / | ||
+ | </ | ||
+ | |||
+ | Change the current clock source, test then add to '' | ||
+ | |||
+ | < | ||
+ | echo hpet > / | ||
+ | </ | ||
+ | |||
+ | |||
+ | See also ' | ||
+ | |||
+ | < | ||
+ | dmesg | grep dahdi | ||
+ | |||
+ | dahdi_test | ||
+ | </ | ||
+ | |||
+ | Acceptable score: >99.975 | ||
+ | |||
+ | === Make DAHDI Timing Available to CTs === | ||
+ | |||
+ | This assumes Asterisk is running as the user ' | ||
+ | |||
+ | < | ||
+ | CTID=100 | ||
+ | vzctl stop $CTID | ||
+ | vzctl set $CTID --devnodes dahdi/ | ||
+ | vzctl start $CTID | ||
+ | vzctl exec $CTID chown -R asterisk.asterisk /dev/dahdi / | ||
+ | </ | ||
+ | |||
+ | === 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 / | ||
+ | |||
+ | < | ||
+ | DEVNODES=" | ||
+ | </ | ||
===== Templates ===== | ===== Templates ===== | ||
- | OpenVZ containers are created from templates. | + | OpenVZ containers are created from templates. |
==== Creating Templates ==== | ==== Creating Templates ==== | ||
- | http://www.elastix.org/component/ | + | http://wiki.openvz.org/Physical_to_container |
http:// | http:// | ||
Line 43: | 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 | + | Clean out the YUM database and stop running applications: |
+ | |||
+ | < | ||
+ | yum clean all | ||
+ | |||
+ | amportal stop | ||
+ | service dnsmasq stop | ||
+ | service httpd stop | ||
+ | service mysqld stop | ||
+ | </ | ||
+ | |||
+ | === Proxmox | ||
< | < | ||
Line 56: | Line 145: | ||
mkdir / | mkdir / | ||
- | rsync -arvpz --exclude=/ | + | rsync -arvpz --exclude=/ |
+ | -e ssh root@xx.xx.xx.xx:/ | ||
sed -i -e ' | sed -i -e ' | ||
Line 78: | Line 168: | ||
chroot . | chroot . | ||
- | MAKEDEV -d /dev -x {p, | + | MAKEDEV -d /dev -x {p, |
+ | port ptmx random urandom zero ram0 | ||
- | MAKEDEV -d / | + | MAKEDEV -d / |
+ | kmsg mem null port ptmx random urandom zero ram0 | ||
chmod 1777 /tmp | chmod 1777 /tmp | ||
Line 154: | Line 246: | ||
vzctl start $CTID | vzctl start $CTID | ||
vzctl enter $CTID | vzctl enter $CTID | ||
+ | |||
+ | # For services info, see http:// | ||
chkconfig --list | grep :on | chkconfig --list | grep :on | ||
- | for i in acpid apmd iptables ip6tables kudzu microcode_ctl smartd | + | for i in acpid apmd auditd bluetooth clock cupsd consolefont cpuspeed dnsmasq gpm hdparm |
+ | irqbalance | ||
+ | openibd pcmcia | ||
Line 164: | Line 260: | ||
+ | Using '' | ||
+ | < | ||
+ | vim / | ||
+ | |||
+ | .bash_history | ||
+ | lost+found | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | /usr/src/* | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | tar --numeric-owner -czvf / | ||
+ | |||
+ | scp / | ||
+ | </ | ||