openvz container missing parameter

Discussion in 'Installation/Configuration' started by kiddiak, Feb 22, 2012.

  1. kiddiak

    kiddiak New Member

    Hi,

    first off I did not follow this guide :)
    http://www.howtoforge.com/installing-and-using-openvz-on-ubuntu-10.04

    i'm running ubuntu 10.04, I followed a debian guide and everything is working 100% with kernel 2.6.32-042stab049.6, a rhel6 based kernel

    For Ispconfig everything works if I fill out everything in "Advanced" UBC parameters for the VM template, but if I create a template without changing the parameters, Vmguarpages, Oomguarpages, Privvmpages and Shmpages get some default values and the other ones are blank. When I create a container with this template logs say:

    2012-02-22T13:22:01+0000 vzctl : CT 101 : Error: required UB parameter swappages not set

    and /etc/sysconfig/vz-scripts/101.conf has no values

    ...
    # Parameters
    ONBOOT="yes"
    KMEMSIZE=""
    LOCKEDPAGES=""
    PRIVVMPAGES="98304:98304"
    SHMPAGES="65536:65536"
    NUMPROC=""
    PHYSPAGES=""
    VMGUARPAGES="65536:65536"
    OOMGUARPAGES="65536:65536"
    NUMTCPSOCK=""
    NUMFLOCK=""
    NUMPTY=""
    NUMSIGINFO=""
    TCPSNDBUF=""
    TCPRCVBUF=""
    OTHERSOCKBUF=""
    DGRAMRCVBUF=""
    NUMOTHERSOCK=""
    DCACHESIZE=""
    NUMFILE=""
    AVNUMPROC=""
    NUMIPTENT=""
    ...

    The problem is that guessing or calculating advanced values is not my cup of tea, tried that and the VM reports 80GB of RAM in a 256M container :) Maybe the rhel6 based kernel needs this value but doesn't get it in a script ispconfig runs when UBC parameters are not set ?

    Regards,
    Kristinn.
     
  2. till

    till Super Moderator

    You have to select a template when you create a new vm and this template fills out all parameters of the VM. There is a default template delivered with ispconfig where all values are set. If you create your own templates, then you have to fill in all available filelds on the advanced tab. See openvz wiki if you want to know more about the values and there are also precalculated parameter sets available there.
     
  3. kiddiak

    kiddiak New Member

    Ok, do you know if these are the default ispconfig values?

    Numproc - 999999:999999
    Numtcpsock - 7999992:7999992
    Numothersock - 7999992:7999992
    Vmguarpages - 262144:262144
    Kmemsize - 2147483646:2147483646
    Tcpsndbuf - 214748160:396774400
    Tcprcvbuf - 214748160:396774400
    Othersockbuf - 214748160:396774400
    Dgramcvbuf - 214748160:396774400
    Oomguarpages - 262144:262144
    Privvmpages - 393216:393216
    Lockedpages - 999999:999999
    Shmpages - 262144:262144
    Physpages - 0:2147483647
    Numfile - 23999976:23999976
    Avnumproc - 180:180
    Numflock - 999999:999999
    Numpty - 500000:500000
    Numsigninfo - 999999:999999
    Dcachesize - 2147483646:2147483646
    Numiptent - 999999:999999
    Swappages - 256000:256000

    ok... I did not see the last value "Swappages" until now... I recovered these values from a db backup of dbispconfig when I deleted all VM templates. But if these are the default values should they be ok for any vps size in terms of ram? Or do you recommend changing values based on vps ram size :]

    any idea why free reports these numbers ?

    root@testvps:~# free
    total used free shared buffers cached
    Mem: 8589934588 28324 8589906264 0 0 18184
    -/+ buffers/cache: 10140 8589924448
    Swap: 0 0 0

    RAM: 256MB
    Burst: 384MB
    CPU units: 30000
    CPU number: 1
    CPU limit %: 20
     
  4. till

    till Super Moderator

    The default values are ok for most smaler vm's but might be increased for larger vms's. See openvz wiki for details and other predefined template sets.

    Regarding the free output, I get correct values here on my debian servers.
     
  5. liaan

    liaan New Member

    I'm having the same issue.

    Digging through the code, there is nothing actually applying the config entered into the template for the paramater swapspace. The template file itself web/vm/templates/openvz.conf.tpl don't even have it in.

    I'm running the latest OpenVZ that needs swappages parameter specified.

    Should i log bug for this?

    L:
     
  6. kiddiak

    kiddiak New Member

  7. liaan

    liaan New Member

    Kiddiak, I specify the swappages, it shows in the Database, but it don't get written to the config file itself on disk.

    Which version of OpenVZ are you running?
     
  8. liaan

    liaan New Member

    Direct copy out of DB table: dbispconfig.openvz_vm;
    You will notice no Swapfile option ..

    What is in you DB?

    Column: Config:

    # Template version
    VERSION="2"

    # Parameters
    ONBOOT="yes"
    KMEMSIZE="unlimited"
    LOCKEDPAGES="unlimited"
    PRIVVMPAGES="3840:3840"
    SHMPAGES="3840:3840"
    NUMPROC="unlimited"
    PHYSPAGES="0:52842"
    VMGUARPAGES="3840:3840"
    OOMGUARPAGES="3840:3840"
    NUMTCPSOCK="unlimited"
    NUMFLOCK="unlimited"
    NUMPTY="unlimited"
    NUMSIGINFO="unlimited"
    TCPSNDBUF="unlimited"
    TCPRCVBUF="unlimited"
    OTHERSOCKBUF="unlimited"
    DGRAMRCVBUF="unlimited"
    NUMOTHERSOCK="unlimited"
    DCACHESIZE="unlimited"
    NUMFILE="unlimited"
    AVNUMPROC="unlimited"
    NUMIPTENT="unlimited"

    DISKSPACE="15728640:15728640"
    DISKINODES="7864320:7864320"
    QUOTAUGIDLIMIT="10000"
    IOPRIO="4"
    QUOTATIME="0"

    CPUS="4"
    CPUUNITS="1000"
    CPULIMIT="400"

    VE_ROOT="/vz/root/$VEID"
    VE_PRIVATE="/vz/private/$VEID"
    OSTEMPLATE="centos-6-x86-devel"
    ORIGIN_SAMPLE="vps.basic"
    HOSTNAME="v102.test.tld"
    IP_ADDRESS="10.0.0.52"
    NAMESERVER="8.8.8.8 8.8.4.4"
    # alternative meminfo: "pages:256000"
    MEMINFO="privvmpages:1"

    CAPABILITY="asdf"
     
  9. kiddiak

    kiddiak New Member

    ok I see it's not written anywhere... strange, then this param. had nothing to do with vm's not starting, just other values when not specified, but for a 256MB container my conf are

    # Template version
    VERSION="2"

    # Parameters
    ONBOOT="yes"
    KMEMSIZE="16384000:18022400"
    LOCKEDPAGES="4096"
    PRIVVMPAGES="98304:98304"
    SHMPAGES="65536:65536"
    NUMPROC="400"
    PHYSPAGES="0:2147483647"
    VMGUARPAGES="65536:65536"
    OOMGUARPAGES="65536:65536"
    NUMTCPSOCK="500"
    NUMFLOCK="200:220"
    NUMPTY="64"
    NUMSIGINFO="512"
    TCPSNDBUF="5365760:10485760"
    TCPRCVBUF="5365760:10485760"
    OTHERSOCKBUF="1503232:4063232"
    DGRAMRCVBUF="262144"
    NUMOTHERSOCK="500"
    DCACHESIZE="4194304:4317184"
    NUMFILE="8192"
    AVNUMPROC="200"
    NUMIPTENT="999999:999999"

    DISKSPACE="10485760:10485760"
    DISKINODES="5242880:5242880"
    QUOTAUGIDLIMIT="10000"
    IOPRIO="4"
    QUOTATIME="0"

    CPUS="1"
    CPUUNITS="30000"
    CPULIMIT="20"

    VE_ROOT="/vz/root/$VEID"
    VE_PRIVATE="/vz/private/$VEID"
    OSTEMPLATE="ubuntu-10.04-x86_64"
    ORIGIN_SAMPLE="vps.basic"
    HOSTNAME="testvps.mydomain.tld"
    IP_ADDRESS="x.x.x.x"
    NAMESERVER="x.x.x.x x.x.x.x"
    # alternative meminfo: "pages:256000"
    MEMINFO="privvmpages:1"

    CAPABILITY="" ( asdf in your conf ? )

    i was reading openvz has no version nr just the kernel version, I have 2.6.32-042stab049.6 and vzctl and vzquota from ubuntu repos
     

Share This Page