Knowledgebase

How to change limits of the package VE_DEFAULT?

In a Virtuozzo environment, you can adjust the resource limits of a container by modifying the configuration file associated with that container. Here's how you can change the limits for the package named VE_DEFAULT:

  1. Access the Container Configuration:

    First, log in to the Virtuozzo Power Panel (VZPP) or use the command line tools to access the container configuration.

  2. Edit the Configuration File:

    Locate and edit the configuration file for the container. By default, the configuration files are typically stored in the /etc/vz/conf/ directory.

    For example, if the container ID is 101, you would look for a file named 101.conf.

    bash

 

  • nano /etc/vz/conf/101.conf
  • Modify Resource Parameters:

    Within the configuration file, you'll find various parameters that define resource limits for the container. These parameters may include:

    • CPUUNITS: Sets the CPU priority.
    • CPULIMIT: Restrict CPU usage as a percentage.
    • PHYSPAGES: Sets the amount of physical memory.
    • DISKSPACE: Limits disk space usage.
    • DISKINODES: Limits the number of inodes.

    For example, to set a new value for CPUUNITS, you might add or modify a line like this:

    makefile
  • CPUUNITS="1000"
  • Save and Close:

    Save the changes and close the file. In Nano, you can do this by pressing Ctrl + X, then Y to confirm, and Enter to exit.

  • Apply the Changes:

    Apply the changes by restarting the container. You can do this using the following command, replacing 101 with the appropriate container ID:

    bash

 

  1. vzctl restart 101

    If your container is currently running, you can also use vzctl stop 101 followed by vzctl start 101.

Please note that adjusting resource limits can impact the performance and behavior of the container. Ensure that you understand the implications of the changes you make. Additionally, always keep backups of important data and configuration files before making significant changes.

 
  • 0 Users Found This Useful
Was this answer helpful?