Download Ubuntu 10.04 OpenVZ Templates

April 30th, 2010 by bodhi.zazen

This is in follow up to my previous post on Ubuntu OpenVZ templates .

I have made a set of Ubuntu 10.04 openvz templates available for download HERE .

The templates *should* be compatible with the Proxmox Web Interface (thus the seemingly odd names) as well as any other OpenVZ host (Centos / Debian).

There are both 32 and 64 bit templates.

Minimal templates

The “minimal” templates are approximately 85 Mb and are, as the name implies, minimal.

lamp

As the name implies, these templates include Apache and MySQL and PHP5.

Both Apache and MySQL have been optimized for use with openvz and use signifigantly less ram then the defaults.

Here is what the 32 bit LAMP template looks like:

root@ubuntu-minimal:/# free -m
                      total     used    free    shared    buffers    cached
Mem:                   256       69     186       0         0          0
-/+ buffers/cache:     69        186
Swap:                  0         0      0
root@ubuntu-minimal:/# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.1  0.6  23432  1644 ?        Ss   06:50   0:00 init
root        21  0.0  0.0    100    16 ?        S    06:50   0:00 [init-logger]
root        86  0.0  0.3  49256  1044 ?        Ss   06:50   0:00 /usr/sbin/sshd
mysql       90  0.1  4.3  83420 11280 ?        Ssl  06:50   0:00 /usr/sbin/mysqld
root       120  0.0  2.7 119440  7280 ?        Ss   06:50   0:00 /usr/sbin/apache2 -k start
www-data   124  0.0  1.7 119440  4636 ?        S    06:50   0:00 /usr/sbin/apache2 -k start
www-data   126  0.0  1.7 119440  4636 ?        S    06:50   0:00 /usr/sbin/apache2 -k start
www-data   127  0.0  1.7 119440  4636 ?        S    06:50   0:00 /usr/sbin/apache2 -k start
www-data   128  0.0  1.7 119440  4636 ?        S    06:50   0:00 /usr/sbin/apache2 -k start
www-data   129  0.0  1.7 119440  4636 ?        S    06:50   0:00 /usr/sbin/apache2 -k start
root       182  0.0  0.1  18552   520 ?        Ss   06:51   0:00 vzctl: pts/0
root       183  0.0  0.7  17860  1904 pts/0    Rs   06:51   0:00 -bash

Note: mysql has no set root password, I would advise you set one ;)

mysql -u root

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_new_root_password_here'); FLUSH PRIVILEGES; exit;

service mysql restart

Feedback welcome

If you have suggestions or experience any difficulties with these templates, please let me know and I will try my best to fix/update them.

StumbleUpon

Posted in Linux

27 Comments »

  1. [...] Follow this link: Bodhi.Zazen: Download Ubuntu 10.04 OpenVZ Templates [...]

    Pingback by Bodhi.Zazen: Download Ubuntu 10.04 OpenVZ Templates | TuxWire — April 30, 2010 @ 9:37 am

  2. Nice! Today I was wondering if any made OpenVZ images for Promox and low and behold you did! Thank you for this!

    Comment by Eric Pritchett — April 30, 2010 @ 10:11 am

  3. @Eric Pritchett

    You are most welcome. Please let me know if you have any problem with them and I will do my best to fix any issues with them.

    Comment by bodhi.zazen — April 30, 2010 @ 3:35 pm

  4. [...] View post:  Shadows of epiphany » Blog Archive » Download Ubuntu 10.04 OpenVZ … [...]

    Pingback by Webmaster Crap » Blog Archive » Shadows of epiphany » Blog Archive » Download Ubuntu 10.04 OpenVZ … — April 30, 2010 @ 4:27 pm

  5. Templates does not correctly working with my Proxmox VE installation.

    Step to reproduce bug:
    1. Create VM container by Ubuntu-10.04-minimal template (does no matter i386 or x64);
    2. Start it;
    3. Open VNC console;
    4. Exec ifconfig command.

    Result:
    Empty ifconfig output.
    No ethernet adapers in VM.

    P.S.
    ~# pveversion -v
    pve-manager: 1.5-8 (pve-manager/1.5/4674)
    running kernel: 2.6.18-2-pve
    proxmox-ve-2.6.18: 1.5-5
    pve-kernel-2.6.18-2-pve: 2.6.18-5
    qemu-server: 1.1-11
    pve-firmware: 1.0-3
    libpve-storage-perl: 1.0-10
    vncterm: 0.9-2
    vzctl: 3.0.23-1pve8
    vzdump: 1.2-5
    vzprocps: 2.0.11-1dso2
    vzquota: 3.0.11-1
    pve-qemu-kvm-2.6.18: 0.9.1-5

    Comment by Sergey — May 1, 2010 @ 5:56 am

  6. The template works IF you create the guest on the command line:

    vzctl create 188 –ostemplate ubuntu-10.04-minimal_10.04_i386

    You can then start the guest with the web interface.

    If you create the guest on the command line you can not manage resources with the web interface.

    I would need to look at the proxmox scripts, will *try* to do that.

    Comment by bodhi.zazen — May 1, 2010 @ 8:36 am

  7. A word of warning – the upstart / init scripts do not always work with Ubuntu 10.04

    If you use Ubuntu 10.04 be prepared to debug / edit / write init scripts.

    For example, mysql will not start when you start the VM without editing the /etc/init/mysql.conf script.

    Comment by bodhi.zazen — May 1, 2010 @ 8:39 am

  8. Thank you for creating these templates of latest Ubuntu for OpenVZ.

    I am trying these 10.04 templates, but is it possible that you misnamed the files?
    I’ve tried both and i386 installs x86_64 OpenVZ container, amd64 installs i386 container (uname -a).

    If the filenames are correct, then I must be missing something…

    Thank you!

    Comment by antencek — May 1, 2010 @ 1:19 pm

  9. Hi as you stated above, we have alos noticed that init.d scripts doesn’t start at boot up, for example we tried with ssh. Are you trying to find a way around or fix the problems with init.d or is it out of your hands (ie openvz’s side)?

    Thanks again for the template!

    Comment by Stefan — May 3, 2010 @ 1:41 am

  10. @Stefan – I will help fix the problems to the best of my ability.

    I can not re-create your issue with ssh as it is working on my end, but I am looking at the init scripts and the Proxmox scripts and will do my best.

    I would consider filing a bug report on LP , but my experience is that OpenVZ bugs are often marked as either invalid or won’t fix, but perhaps it is worth a try.

    Comment by bodhi.zazen — May 3, 2010 @ 1:52 pm

  11. I tried with update-rc.d ssh defaults but got some issues with the files not beeing as they should.

    I havent got an installation where I am now but maybe you can get somethign out of it.

    Comment by Stefan — May 4, 2010 @ 12:09 am

  12. Ok, since everyone is reading this post, there are several things that do not work ok. Some fixes below:

    Create a second file:

    > /etc/init/srfix.conf

    And paste the following in it:

    # This task runs the old System V-style rc script when changing to runlevels 0 and 6

    description “Fixes some halt/reboot issues”
    author “Whatever”

    start on runlevel [06]

    export RUNLEVEL

    script

    if [ $RUNLEVEL -eq 6 ]; then
    exec /etc/init.d/rc 6
    else
    exec /etc/init.d/halt stop
    fi

    end script

    Edit the file: /etc/init/rc.conf and comment out the two lines as follow, otherwise the backwards compatibility with the old style SysV is lost and things do not work ok without it:

    #console output
    #env INIT_VERBOSE

    As for the ssh problem there is that line with the oom protection, comment it out (sorry forgot how it was written in the file, openvz does not support that directive, same for MySQL and other apps from 10.04).

    Please note that in your templates you did not remove the mountall* and ply* files that’s why the networking does not start ok.

    Comment by Tomoiaga — May 4, 2010 @ 9:29 am

  13. Thank you Tomoiaga , I will add that script as well.

    In looking at the logs I decided to remove more of the init scripts, many of them are not applicable to an OpenVZ guest …

    Comment by bodhi.zazen — May 4, 2010 @ 9:56 am

  14. No problem.
    I think that since rc.conf is fixed there is not need for the “if then else” in srfix.conf and only the directive with halt for the 0 runlevel can remain, I didn’t have the time to fully test and see if it works that way too, I fixed the reboot and after that the rc.conf, maybe you can look at it and simplify the srfix.conf file too :)

    Comment by Tomoiaga — May 4, 2010 @ 10:37 am

  15. Great. If you can , please remove the srfix.conf and everything related to it. Fixing the rc.conf did the trick (just tested) and everything works ok. There’s no need for it anymore. Thank you!

    Comment by Tomoiaga — May 4, 2010 @ 10:47 am

  16. LOL Thank you for the follow up.

    Comment by bodhi.zazen — May 4, 2010 @ 12:42 pm

  17. @antencek I updated the templates as the older ones had several unresolved “issues”.

    Comment by bodhi.zazen — May 4, 2010 @ 7:15 pm

  18. Yes, that’s it, works ok now :)
    There are some things I am looking at currently like the pcap lib. Seems tcpdump/track and others can’t run since Ubuntu 9.10. Any ideas ? :)

    Comment by Tomoiaga — May 5, 2010 @ 1:38 am

  19. Yes! The new version of the templates works out of the box on Proxmox (proxmox-ve-2.6.24). Good work bodhi and contributors!

    Comment by Morten — May 5, 2010 @ 1:40 am

  20. Don’t forget to apply the issue solving updates to your tutorial or a new one for&by community:

    http://blog.bodhizazen.net/linux/ubuntu-10-04-openvz-templates/
    http://wiki.openvz.org/Ubuntu_Lucid_template_creation

    Comment by narcisgarcia — May 5, 2010 @ 2:27 am

  21. @Morten – Glad to hear they are working for you (nice to get independent confirmation).

    Comment by bodhi.zazen — May 5, 2010 @ 10:13 am

  22. Is even the init scripts working now aswell out of the box? Thanks for all the great work!

    Comment by Stefan — May 6, 2010 @ 12:35 am

  23. @Stefan – If you’re asking me: The only thing I did was to download the new files, create a new openvz VPS from the Proxmox web interface and press the start button and I was a happy camper. Now I’m going to migrate all the old 8.10 VPS’ to shiny new 10.04.
    And again I’m arguing with myself whether I should go for 32 or 64 bit VPS. Tom, Dietmar and the others at Proxmox seem quite conviced 32 bit VPS is the way to go. What’s the opinion around here?

    Comment by Morten — May 6, 2010 @ 3:59 am

  24. @Morten – Glad it is working for you. The 32 bit VPS will use slightly less resources (ram / disk space) and will perform slightly better. Run a few benchmarks, look at the disk space used, and decide for yourself which you prefer.

    @Stefan – I fixed the init scripts in both the minimal and lamp templates for what services are installed (ssh , apache, and mysql). If you install additional services you may (likely) have to adjust a few init scripts manually. It is hit and miss and I tried to minimize any alterations of init scripts to maintain as much compatibility as possible.

    I did some fine tuning of the apache and mysql configuration to lessen ram use.

    If there are no further suggestions or problems I will transcribe this post to the openvz wiki, although I do not mind if someone else helps.

    Comment by bodhi.zazen — May 6, 2010 @ 3:14 pm

  25. Great has this oom “bug” in openvz been reported?

    Comment by Stefan — May 7, 2010 @ 12:32 am

  26. [...] Pentru că nu dețin toate informațiile, dau următoarele link-uri de unde mă inspir și eu: Ubuntu 10.04 OpenVZ Templates Download Ubuntu 10.04 OpenVZ Templates [...]

    Pingback by printf(" SaltwaterC "); » Blog Archive » Ubuntu 10.04 Lucid Lynx și OpenVZ — May 13, 2010 @ 12:38 am

  27. Hi Bodhi,

    Many thanks for these templates. :)

    Comment by Martin — June 18, 2010 @ 9:41 am

RSS feed for comments on this post. TrackBack URL

Leave a comment