1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Check out the 6 new Certified Incredible PBX Builds for Asterisk 11 and 13 featuring CentOS 6, Ubuntu 14, Raspberry Pi 2, and Asterisk-NOW.
    Dismiss Notice

PIAF OpenVZ Image and Install

Discussion in 'Add-On Install Instructions' started by jonathan0397, May 2, 2009.

  1. jonathan0397

    jonathan0397 New Member

    I have a pretty decent VPS Provider who has loaded a trixbox image into my VPS. I had requested access to PBX In A Flash but they could not load an image.

    Does anyone have access to a stock image or know where I can find one?

    Thanks in Advance.:smile5:
  2. dad311

    dad311 Guru

  3. wardmundy

    wardmundy Nerd Uno

    You can find CentOS OpenVZ images here. Then you can follow along with Joe's tips here and the comments here to get a functioning system.
  4. jonathan0397

    jonathan0397 New Member

    Thanks Ward, It was great seeing you and Joe at the ATLAUG install fest. I am going to run through the instructions on the VPS and see if I can get it working.

    Was wondering though if anyone had a pre-made OpenVZ dump already out there that the provider could put in as an image for new users.

  5. wardmundy

    wardmundy Nerd Uno

    I wrestled with this a bit last week, and didn't have much luck with the OpenVZ image. If you're using Proxmox, it is incredibly easy to do exactly the same thing using our standard ISO images.
    1. Under Appliance Templates... upload the ISO.
    2. Under Virtual Machines, Create... create a Fully Virtualized KVM and choose the ISO image you uploaded.
    3. Under Virtual Machines, List... click on the VMID of the KVM you just created and choose Start.
    4. Once the KVM starts, click OpenVNC Console and follow the prompts to install PBX in a Flash in the usual way.
    The whole process takes about 15 minutes. :smile5:
  6. jroper

    jroper Guru

  7. jroper

    jroper Guru


    Once having created a virtual installation of PBX in a Flash or whatever on Proxmox, you can turn it into a template as follows:-

    1. Create virtual machine
    2. update it, and install everything
    3. yum clean all ; Save some space.
    4. See how big it is, and change the disk size to slightly larger.
    5. Restart it, check it works.
    6. Stop it
    7. Delete IP address
    8. tar the contents of /var/lib/vz/private/XXX
    9. Put tarball in /var/lib/vz/template/cache
    10. Template will now be available in Create Virtual Machines.

    You can then take the virtual image and transfer it to any Openvz server.

  8. wardmundy

    wardmundy Nerd Uno

    For Joe's tip to work, you have to start with an OpenVZ image. We never could get that functioning reliably with the tips above. Perhaps Joe knows what's missing.
  9. bucasia

    bucasia Guru

    There's obviously a couple of ways you can do this. Either start with an existing OpenVZ CentOS template and install PIAF on it, or install PIAF from the ISO and convert that to an OpenVZ template.

    My preference is definitely the 2nd option as I think it gives you closer to the standard distro (obviously with a different kernel)

    So, a method that works is -

    - do a standard PIAF install on a VMWare VM (or physical hardware)
    - do this - http://wiki.openvz.org/Creating_a_CentOS_5.0_Template
    - disable the TTY in /sbin/safe_asterisk
    - turn down the config files for http and mysql as you probably won't have much memory
    - disable a load of services you don't need on a VPS
    - sort out the zaptel stuff if you want meetme or iax2 - http://forum.openvz.org/index.php?&t=msg&goto=26582

    And that's about it :)
  10. jroper

    jroper Guru

    Hi Ward

    Where were you having problems?

    I installed from the Centos image, my hardware does not support the ISO install.

    I did not get zaptel working due to a lack of kernel sources, and turning disabling the TTY in /sbin/safe_asterisk needed doing.

    Hopefully, the link above will cure the timing source issues.

  11. wardmundy

    wardmundy Nerd Uno

    The missing kernel sources (from an open source product :rolleyes5:) is the major deal breaker for me. Not sure I understand the suggestion above. You load an ISO and then you load the CentOS base install over the top of it. Doesn't sound quite right. If bucasia has actually gotten this to work, perhaps he'll share a link to his OpenVZ image which we can download and host for the benefit of everyone else.
  12. jhamon

    jhamon New Member


    I've created an openvz image for anyone who wants to try it.

    I'm not saying that is anything like 100% but I figure that given what I have produced someone can improve on it and then hopefully will let me and other users take advantage of it.

    The size of the file is 700 Mb.
  13. jhamon

    jhamon New Member


    Has a few emails about this but the users have not enabled emailing from the forum so I cannot get back to you directly.
  14. BigSeph

    BigSeph New Member

    It would be killer if there was an OpenVZ template with pbxiaf already installed on a tested CentOS.

    Been tinkering with Proxmox clustering and this is some great stuff.

    If any of you have a 64-bit version you want to upload send me a link. :)
  15. jonathan0397

    jonathan0397 New Member

    Any progress in this area, I have had my VPS system up and running mostly trouble free with around 50+ users for over 5 months now.

    Still would love to be able to do it with PBXiaf though, Just need that elusive template.

  16. nobaloney

    nobaloney New Member

    lIs this project moving forward? I want to install PIAF on a virtuozzo vps and I don't have any idea where to begin.

  17. wardmundy

    wardmundy Nerd Uno

    OpenVZ templates have been available on the beta site for months. :wink5:
  18. trentc

    trentc New Member

    The dahdi issue is easy to solve now since Asterisk started putting up asterisk repos binaries for yum located at


    You can have anything you cannot compile on a VPS will be up and running in a few moments.
  19. wardmundy

    wardmundy Nerd Uno

    How to Update an OpenVZ Template

    To bring this thread current, I've added a few minor tweaks to Joe Roper's original post about how to upgrade, update, or migrate an existing OpenVZ template. Thanks to the great work of Darrell Dillman, we'll have a new OpenVZ template for PIAF2 with CentOS 6.2, Asterisk 1.8.8, and FreePBX 2.9 shortly.

    1. Create virtual machine
    2. update it, and install everything
    3. yum clean all ; Save some space.
    4. See how big it is, and change the disk size to slightly larger.
    5. Restart it, check it works.
    6. Run passwd-master and set obscure default password
    7. amportal chown
    8. mknod /dev/tty9 c 4 9
    9. From within Asterisk CLI, use database del to delete everything that appears with database show including:
     database del dundi secret
     database del dundi secretexpiry
    10. Stop it
    11. Delete IP address and adjust etc/resolv.conf
    12. Clean out bash history in root/.bash_history
    13. tar the contents of /var/lib/vz/private/XXX
    14. Put tarball in /var/lib/vz/template/cache
    15. Template will now be available in Create Virtual Machines.

    You can then take the virtual image and transfer it to any OpenVZ server.
  20. w1ve

    w1ve Guru

    ChicagoVPS OpenVZ PIAF...

    I've been running my OpenVZ PIAF PBX at ChicagoVPS for about 5 months or so without any issues. It's one of the default OS options. They are re-running their $7/mo 2GB RAM/50GB disk server special again.

    I've just asked support if they will upgrade to the latest tempate. We shall see what happens.

Share This Page