How to reset LVE settings in CloudLinux?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noyearzero
    Member
    Forum ExplorerTechnical Associate
    • Mar 2021
    • 66

    #1

    How to reset LVE settings in CloudLinux?

    Hi,

    I have modified many packages and users LVE settings. Now I want to reset all packages / individual settings to Default.

    Can you please tell me the exact command to reset all CPU, RAM etc.. settings to default for all?

    Thanks
  • bogdan.sh
    Administrator
    • Nov 2016
    • 1221

    #2
    Hi,

    There is no command to reset all settings to defaults, the best is to create a new ve.cfg file with default content:
    1. backup existing:

    Code:
    mv /etc/container/ve.cfg /etc/container/ve.cfg_back
    2. create new one:

    Code:
    vi /etc/container/ve.cfg
    3. enter the following section:

    Code:
    <lveconfig>
    
    <system>
    
    <ubc enabled="false"></ubc>
    
    </system>
    
    <defaults>
    
    <cpu limit="100"></cpu>
    
    <ncpu limit="1"></ncpu>
    
    <io limit="1024"></io>
    
    <mem limit="0"></mem>
    
    <pmem limit="262144"></pmem>
    
    <nproc limit="100"></nproc>
    
    <other maxentryprocs="20"></other>
    
    </defaults>
    
    </lveconfig>
    4. apply it:

    Code:
    lvectl apply all

    Comment

    • bogdan.sh
      Administrator
      • Nov 2016
      • 1221

      #3
      Perfect. Thanks a lot. My only concern was if I remove those username entries from my ve.cfg I might end up in a mess.

      Comment

      Working...