Trouble with first time OpenVZ install - please help

Discussion in 'Installation/Configuration' started by adobe, Sep 7, 2008.

  1. adobe

    adobe New Member


    I recently bought a fairly nice server and I decided to run a small VPS service from it. So, I came across OpenVZ (OS Level Virtualization Tool) and I was very excited about it, so I came to my #1 linux tutorial place, How2Forge site and found this :-

    I followed this guide word for word and then finally installed OpenVZ and even created my first VPS on it.

    My problem is that, i set the VPS hard disk to be 100GB but when I entered the vps using the command vzctl enter xxx command and typed the shell command df -h it shows the size of my entire hard disk of my host server (instead of the 10gb disk limit I set).

    I remember, when I was creating a VPS, it kept erroring, so i turned off a config to disable something about dynamic resource allocation what not. Could it be that?

    Was I meant to create a separate partition on my host server, i.e. /vz/ in ext3 format? If i don't do this, that dynamic hard disk feature wont work?

    I'm fairly new to both linux and openvz, can someone help this newbie please. Thanks in advance for your help.
  2. falko

    falko Super Moderator ISPConfig Developer

    Do you remember the exact error messages? What did you do then?

    No, you don't need a separate partition.

    You can try to change the hard disk size in the VM's configuration file in /etc/vz/conf/.
  3. adobe

    adobe New Member

    I am sorry, I can't remember the exact error message now. You know a "private" area is made when a new container is created? Before, it was complaining something about not being able to create that private area, when ever i entered this command:

    vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic

    But, after i changed a config of OpenVZ it self, it worked fine. And I remember correctly, it was something about disabling dynamic resource allocation. Now, i can't even find that config file or the setting it self :(
    health shop
    Last edited: Feb 2, 2011
  4. falko

    falko Super Moderator ISPConfig Developer

    I hope you used unique IDs when you ran that command?
  5. adobe

    adobe New Member

    Yes, I did. The IP I was going to use on the VPS ended in 109, So I used the VEID as 109.

    Besides, it's the one and only VPS on my entire host server. I made sure no other VE is running by typing:

    vzlist -a

    and the list was empty. Then i went onto create the VPS with the VEID 109.
    GSX series
    grape ape marijuana strain
    Last edited: Feb 9, 2011
  6. adobe

    adobe New Member

    Okay, after much searching, I have finally found the EXACT error message:

    # vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic
    Creating VE private area (debian-4.0-i386-minimal)
    vzquota : (error) Quota on syscall for 109: File exists
    vzquota on failed [3]
    vzquota : (error) Quota is not running for id 109
    Performing postcreate actions
    VE private area was created

    Though it says the vps is created, it actually isn't created. I confirmed it by doing this:

    # vzctl start 109
    Starting VE ...
    vzquota : (error) Quota on syscall for 109: File exists
    vzquota on failed [3]


    # vzlist -a
    109 - stopped - -

    So, I was searching the OpenVZ forum and came across the following solution:

    After I did that, I was able to create and run VPS servers, however, I could not control the disk space because the disk_quota is turned off. If i turn it on, I can no longer create VPS.

    Host Server's Kernel : Linux 2.6.18-92.1.1.el5.028stab057.2 #1 SMP Mon Jul 21 17:08:31 MSD 2008 x86_64 x86_64 x86_64 GNU/Linux

    Host Server's OS : CentOS 5.2 Stable (64-Bit Version)

    Please advice...
    Last edited: Sep 8, 2008
  7. adobe

    adobe New Member

    Also, I did some searching and I came across the fact that, "Linux Quota" might be turned on the root / partition of the server, which conflicts with the OpenVZ. So, I found this article on how to turn off linux quota for CentOS here :-

    Will this help me?

    If it will, will it affect my host system? I already have a DirectAdmin control panel running on the host machine and various other stuff and I don't want to ruin them.
    Honda FES125 Pantheon
    Last edited: Feb 2, 2011
  8. adobe

    adobe New Member

    Okay, I have fixed the problem by turning off quota after getting confirmation from my host that turning off quota will not hurt. This is how I fixed it:

    First I worked out where is what mounted by ...

    # mount
    /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,usrquota,grpquota)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/sda1 on /boot type ext3 (rw)
    tmpfs on /dev/shm type tmpfs (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

    Then I turned off quota like this ...

    # quotaoff /dev/mapper/VolGroup00-LogVol00

    And when I created a VPS, it worked without any errors like before ...

    # vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic
    Creating VE private area (debian-4.0-i386-minimal)
    Performing postcreate actions
    VE private area was created

    And finally, VPS Quota is working, check this out ...

    [[email protected] ~]# vzctl set 109 --diskspace 100G:100G --save
    Saved parameters for VE 109
    [[email protected] ~]# vzctl enter 109
    entered into VE 109
    vps1:/# cd $HOME
    vps1:~# df -h
    Filesystem Size Used Avail Use% Mounted on
    simfs 100G 151M 100G 1% /
    tmpfs 3.9G 0 3.9G 0% /lib/init/rw
    tmpfs 3.9G 0 3.9G 0% /dev/shm

    Posting the solution here to help anyone else who runs into similar trouble as I did.
  9. abdi

    abdi Member

    This is very helpful, I landed in the same situation and disabling quotas on '/' partition solved the problem too.

Share This Page