Lvectl - a utility for managing LVE - Lightweight Virtual Environment - 2026
Published: 2026-08-06
lvectl - a utility for managing LVE - Lightweight Virtual Environment - 2026
Introduction: what is LVE
LVE (Lightweight Virtualized Environment) is the key technology of the CloudLinux OS operating system, designed to isolate and limit the resources of individual users (tenants) on shared hosting servers. Unlike full-blown containers or virtual machines, LVE does not create a separate environment for each user but operates at the kernel level, limiting in real time the resources consumed by the processes of a particular user.
The concept is simple: each user is assigned a unique identifier (UID), and all processes started on behalf of that user automatically fall into their own LVE. If a user exhausts the allocated resources - CPU, memory, number of processes, or disk I/O speed - they will not "bring down" their neighbors on the server; they will simply be limited in speed. This is why LVE is called "lightweight virtualization": it requires no separate OS, consumes no extra memory, and does not slow the server down.
In practice, LVE is primarily used by hosting providers to:
- guarantee every client stable operation regardless of the load of their neighbors;
- prevent a single "problem" website or script from consuming all server resources;
- sell plans with clear resource limits (CPU, RAM, I/O);
- simplify support: instead of manually fighting overloads, the administrator simply configures limits.
All LVE environments are created based on user IDs and are managed with the dedicated command-line utility lvectl.
What is lvectl
lvectl is CloudLinux's main command-line utility for managing LVE. It ships with CloudLinux OS packages and allows the administrator to:
- create and delete LVEs;
- set and change resource limits (CPU, memory, processes, I/O);
- apply settings on the fly, without rebooting the server;
- work with packages (sets of limits) and resellers;
- get information about the current state of LVEs and loaded limits;
- automate configuration through scripts and JSON output.
The official CloudLinux documentation notes that for most control panels there is a convenient LVE Manager plugin that allows managing limits through a graphical interface. However, understanding the command line and the lvectl utility is necessary in the following cases:
- the panel is not supported by LVE Manager (e.g., a non-standard panel or a custom billing system);
- bulk or scripted limit configuration is required (e.g., when migrating clients);
- you need to fine-tune parameters not available in the graphical interface;
- you need to debug LVE operation when problems arise.
The utility works only on servers with CloudLinux OS installed. On regular distributions (CentOS, Ubuntu, etc.), lvectl is unavailable because LVE is implemented by the special CloudLinux kernel.
Syntax
The general syntax of the utility is as follows:
lvectl command [veid] [options]
Here:
- command - the command to execute (e.g.,
set,list,limits); - veid - the LVE identifier (usually the user's UID), or the username for commands such as
set-user; - options - additional command options (limits, output flags, etc.).
Many commands work without specifying a veid - for example, lvectl list shows all loaded LVEs.
Main commands
Below is the complete table of lvectl commands with brief descriptions:
| Command | Description |
|---|---|
apply |
Apply LVE settings to the specified container |
apply all |
Apply settings to all LVEs |
apply-many |
Apply LVE limits to several users at once (UIDs are read from stdin) |
set |
Set LVE parameters or create a new LVE |
set-user |
Set LVE parameters by username or create an LVE for the user |
set-reseller |
Create an LVP container for a reseller and move LVEs into it |
set-reseller-default |
Set default limits for users inside an LVP |
sync-map |
Update the reseller-to-user map for correct limit operation |
list |
Show loaded LVEs |
list-user |
Show LVEs with usernames instead of IDs |
limits |
Show current LVE limits |
all-user-list |
Show user limits together with package information |
delete |
Delete an LVE and return settings to default values |
delete-user |
Delete a user's LVE and return settings to default |
destroy |
Destroy an active LVE without changing the configuration file |
destroy all |
Destroy all active LVEs |
package-set |
Configure LVE parameters for a package |
package-list |
Show LVE parameters for packages |
package-delete |
Delete LVE settings for a package |
paneluserslimits |
Show current limits of control panel users |
paneluserlimits |
Show limits of a single control panel user |
limit |
Limit a PID inside the specified LVE |
release |
Release a PID from the LVE |
set-binary |
Add a binary file to be run inside the LVE |
del-binary |
Remove a binary file from the LVE list |
list-binaries |
Show the list of LVE binary files |
reload-binaries |
Reload the list of binary files |
help |
Show help |
version |
Show lvectl version |
lve-version |
Show LVE version |
Let us look at each command group in more detail.
Apply commands: apply, apply all, apply-many
Settings made through lvectl set are not always applied immediately to already running processes. The apply command forcibly applies the saved limits to a specific LVE:
lvectl apply 504
To apply settings to all loaded LVEs at once, use:
lvectl apply all
The apply-many command is designed for bulk limit application: it reads a list of UIDs from standard input (one per line) and applies LVE settings to each. This is especially convenient in scripts where the user list is generated dynamically - for example, via cut from /etc/passwd:
cut -d: -f3 /etc/passwd | lvectl apply-many
Set commands: set and set-user
The set command is the central command of the utility. It sets LVE limits by user ID or creates a new LVE if it does not exist yet. If an LVE with the specified veid already exists, its limits will be updated:
lvectl set 504 --speed=150%
The set-user command does the same thing but accepts a username instead of a numeric UID. This is more convenient and intuitive in everyday work:
lvectl set-user wiki --speed=600%
It is important to understand the difference: set works with IDs, while set-user works with names. Both commands automatically save changes to the configuration file /etc/container/ve.cfg.
Display commands: list, list-user, limits, all-user-list
Viewing the list of loaded (active) LVEs:
lvectl list
The same list, but with usernames instead of numeric IDs:
lvectl list-user
Viewing the current limits of a specific LVE by UID:
lvectl limits 504
According to the official CloudLinux documentation, the limits output displays the following columns:
- CPU speed limit;
- physical memory limit;
- virtual memory limit;
- maximum number of entry processes;
- maximum number of processes;
- disk I/O limit;
- I/O operations per second limit.
The all-user-list command shows the limits of all users together with the assigned packages - convenient for auditing plans and verifying configuration consistency.
Delete commands: delete, delete-user, destroy
The delete command deletes an LVE and returns the settings to default values:
lvectl delete 504
The delete-user command does the same by username:
lvectl delete-user wiki
The destroy command destroys an active LVE without changing the configuration file - that is, changes apply until reboot or until settings are reapplied. This is useful when you need to "softly" recreate an environment:
lvectl destroy 504
A full reset of all active LVEs is performed with:
lvectl destroy all
Control panel commands: paneluserslimits, paneluserlimits
These commands show the limits of control panel users. paneluserslimits displays the current limits of all users, while paneluserlimits displays the limits of one specific user. They are useful when integrating lvectl with billing systems and hosting panels.
LVE limit parameters
The main parameters used to set resource limits are listed in the table:
| Parameter | Description |
|---|---|
--speed=N% |
CPU limit in percent. 100% = one CPU core |
--speed=Nmhz |
CPU limit in megahertz/gigahertz (MHz/GHz) |
--io=N |
Disk I/O speed limit (KB/s) |
--iops=N |
Limit of I/O operations per second |
--pmem=N |
Physical memory limit (Physical Memory) |
--vmem=N |
Virtual memory limit |
--mem=N |
Alias for vmem (deprecated parameter) |
--nproc=N |
Maximum number of user processes |
--maxEntryProcs=N |
Maximum number of entry processes |
Let us look at each parameter in more detail.
CPU limit: --speed
The --speed parameter is the most important and frequently used one. It sets the maximum processor time consumption in percent, where 100% corresponds to one full CPU core:
--speed=100%- one core;--speed=200%- two cores;--speed=600%- six cores;--speed=50%- half a core.
An example of setting a "one and a half cores" limit from the official CloudLinux documentation:
lvectl set 504 --speed=150% lvectl limits 504
When setting a value below 100%, the CPU is divided between cores, so even half a percent can be distributed across multiple cores. There is also a form of setting the limit in megahertz:
lvectl set-user wiki --speed=2500mhz
Memory limits: --pmem and --vmem
Physical memory (pmem) is the real RAM that the user's processes can use. The limit is set in megabytes or gigabytes:
lvectl set-user wiki --pmem=4096M
Virtual memory (vmem) is the address space of processes, which is usually larger than physical memory (memory can be mapped but not used). In most cases it is enough to configure pmem and leave vmem "unlimited" or with a significant margin. The deprecated --mem alias corresponds to vmem and is not recommended.
Disk I/O limits: --io and --iops
The --io parameter limits the average disk read/write speed in kilobytes per second:
lvectl set 504 --io=2048
The --iops parameter limits the number of I/O operations per second (IOPS). This is important for protecting disk arrays from "parasitic" load - for example, when a user's script starts endlessly reading from disk.
Process limits: --nproc and --maxEntryProcs
The --nproc parameter limits the total number of processes a user can start:
lvectl set-user wiki --nproc=100
The --maxEntryProcs parameter limits the number of "entry" processes - those started on behalf of the user at the moment the limit is exceeded. This is a protective mechanism: when a user reaches their process limit, new process start attempts go into a "wait queue" and start only after resources are freed, instead of crashing with an error.
Additional parameters
In addition to limit parameters, lvectl has auxiliary flags:
| Parameter | Description |
|---|---|
--json |
Output the result in JSON format |
--bytes |
Show limits in bytes (works only with --json) |
--unlimited |
Remove all limits |
--reseller |
Specify the owning reseller |
--save |
Save settings (deprecated parameter) |
--save-all-parameters |
Save all parameters, including default values |
--skip-update-cfg |
Do not update /etc/container/ve.cfg |
--save-username |
Save the username in the configuration |
--default |
Reset the selected limits to default values |
Full limit reset: --unlimited
The --unlimited parameter removes all limits from an LVE, making them "unlimited". The official CloudLinux documentation shows this example:
lvectl set 504 --unlimited lvectl limits 504
After this command, all limits (CPU, memory, I/O, processes) become infinite. It should be used with caution - removing limits from one user can negatively affect neighbors on the server.
JSON output: --json and --bytes
The --json parameter switches the utility output to machine-readable JSON format. This opens broad opportunities for automation: you can write scripts in Python, PHP, Bash and other languages that receive limits and LVE state in a convenient form:
lvectl limits 504 --json
The --bytes parameter is used only together with --json and forces memory values to be shown in bytes instead of "human-readable" units (KB, MB, GB). This simplifies programmatic data processing, eliminating the need to parse unit suffixes.
Practical examples
Let us consider a typical hosting administrator workflow - from initial inspection to setting limits - following the official CloudLinux documentation.
Step 1. View the list of LVEs
The first thing an administrator does is look at which LVEs are loaded on the server:
lvectl list
The command shows active environments, i.e., users whose processes are currently running on the server.
Step 2. Determine the user's UID
To work with a specific user, you need to know their ID. In the official example this is the user cltest3:
id cltest3
The output will show the uid, gid and groups of the user. It is the uid that is used as the veid in lvectl commands.
Step 3. View current limits
Now you can view the user's limits by their ID:
lvectl limits 504
The output will list all seven columns: CPU speed, physical memory, virtual memory, entry processes, number of processes, I/O and IOPS.
Step 4. Set the CPU limit
Let us change the CPU limit to one and a half cores:
lvectl set 504 --speed=150% lvectl limits 504
The second command verifies that the changes were applied.
Step 5. Set several limits in one command
Any number of parameters can be combined in a single command. For example, set a full core (100%), 1 GB of physical memory and a disk I/O limit of 2048 KB/s:
lvectl set 504 --speed=100% --pmem=1G --io=2048 lvectl limits 504
This approach is convenient because limits are applied atomically with a single write to the configuration file.
Step 6. Remove all limits
Return the user to unlimited mode:
lvectl set 504 --unlimited lvectl limits 504
Step 7. Set limits by username
For everyday work, set-user is more convenient - you do not need to remember numeric IDs:
lvectl set-user wiki --speed=600% --pmem=4096M
This command limits the user wiki to six CPU cores (600%) and four gigabytes of physical memory.
Monitoring: lvetop and lveps
CloudLinux provides two additional utilities to control current LVE resource usage.
lvetop
The lvetop utility shows the current resource consumption of all LVEs in real time - essentially an analog of top, but in terms of LVE environments. It shows which users are consuming how much CPU, memory and I/O right now:
lvetop
According to the official CloudLinux documentation, lvetop is the recommended tool to see the current load by LVE.
lveps
The lveps utility provides more detailed information about processes inside an LVE. Run with the -p key, it lists all processes and threads belonging to the environment:
lveps -p
This is an indispensable diagnostic tool: if a user's website is slow, lveps can quickly identify which process (or many of them) is exhausting the LVE resources.
Working with packages
Packages in CloudLinux are named sets of limits that can be assigned to users. Thanks to packages, the administrator does not need to enter dozens of parameters for each client: it is enough to create a package matching the plan once and assign it.
Package management commands:
lvectl package-set- create or change LVE parameters for a package;lvectl package-list- show LVE parameters for all packages;lvectl package-delete- delete LVE settings for a package.
Example of creating a start package with a 100% CPU limit and 1 GB of memory:
lvectl package-set start --speed=100% --pmem=1G
Viewing all packages:
lvectl package-list
Deleting a package:
lvectl package-delete start
When a package is assigned to a user through a control panel or directly in the configuration file, the user's LVE automatically inherits the package limits. The all-user-list command shows user limits together with assigned packages - convenient for checking against the pricing plans.
Working with resellers (LVP)
CloudLinux supports the concept of LVP (Lightweight Virtualized Provider) - reseller containers that group the LVEs of that reseller's users. This allows limiting the total resources of all clients of one reseller, not just individual users.
Reseller management commands:
lvectl set-reseller- create an LVP container for a reseller and move LVEs into it;lvectl set-reseller-default- set default limits for users inside an LVP;lvectl sync-map- update the reseller-to-user mapping.
Example of creating an LVP for the reseller reseller1:
lvectl set-reseller reseller1
Example of setting default limits for users inside an LVP:
lvectl set-reseller-default reseller1 --speed=100%
After changing the reseller's client composition (e.g., when migrating a user between resellers), the mapping must be updated:
lvectl sync-map
The --reseller parameter when setting limits allows explicitly specifying the owning reseller:
lvectl set-user client1 --reseller=reseller1 --speed=100%
LVP gives providers a flexible two-level model: limits "on top" (for all clients of a reseller) and "below" (for each individual user).
Managing binary files
Sometimes it is necessary for a specific binary file (e.g., a compiler or system process) to always run inside a user's LVE regardless of who starts it. For this purpose, binary file management commands are used:
lvectl set-binary- add a binary file to the list of files run inside the LVE;lvectl del-binary- remove a binary file from the list;lvectl list-binaries- show the current list of binary files;lvectl reload-binaries- reload the list without restarting services.
Example of adding a binary file:
lvectl set-binary /usr/bin/php
Viewing the list:
lvectl list-binaries
Removing from the list:
lvectl del-binary /usr/bin/php
The binary file mechanism is especially important for the correct operation of PHP via FastCGI and other services launched by superdaemons on behalf of other users - it guarantees that processes are attributed to the correct LVE and counted against the limits.
Working with PIDs
The limit and release commands allow manually managing the ownership of processes to an LVE:
lvectl limit PID- limit the process with the specified PID inside the corresponding LVE;lvectl release PID- release the PID from the LVE.
These commands are usually used during debugging, when a process has "lost" its connection to its environment (for example, after migration or manual startup on behalf of another user).
Automation and scripting
The utility's JSON output opens broad opportunities for integration with external monitoring and billing systems. An example of getting limits in JSON:
lvectl limits 504 --json --bytes
Such output is easy to process, for example, in a Python script: get the memory limit in bytes, compare it with the current consumption from lvetop, and generate an alert for the administrator.
Bulk limit application is done via apply-many by passing a list of UIDs through stdin. By combining apply-many with user selection from /etc/passwd or a panel database, you can apply the same limits to thousands of accounts in one pass:
lvectl apply-many < /tmp/users.txt
Configuration files
The main LVE configuration file is /etc/container/ve.cfg. It stores the set limits and environment settings. When lvectl set and set-user commands are executed, changes are automatically written to this file.
Manual editing of ve.cfg is possible but not recommended without a deep understanding of the format: any syntax error can cause the limits not to load. After manually changing the file, you must apply the settings:
lvectl apply all
Useful parameters affecting lvectl behavior:
--skip-update-cfg- forbids the utility from updatingve.cfgwhen executing a command (changes will be applied only "on the fly" and will disappear after reboot);--save-all-parameters- saves all LVE parameters, including default values (useful for fully fixing the state);--save-username- saves the username in the configuration along with the limits (simplifies auditing);--default- resets the selected limits to default values.
The deprecated --save parameter is no longer required: modern lvectl versions save settings automatically. Similarly, the --cpu parameter is deprecated - use --speed instead.
Integration with control panels
Although this article is devoted to the command line, it is worth understanding how lvectl relates to control panels. For cPanel, Plesk, DirectAdmin, ISPmanager and other popular panels, CloudLinux provides the LVE Manager plugin, which visualizes limits and current consumption. Behind the scenes, the plugin executes the same lvectl commands - so knowing the utility helps even when working with the plugin:
- if some parameter is unavailable in the panel interface, it can be adjusted manually via lvectl;
- when supporting clients, it is useful to quickly check limits via
lvectl limits; - the
paneluserslimitsandpaneluserlimitscommands show limits in terms of the control panel and are convenient for verification.
Tips and best practices
Based on the official CloudLinux documentation and practical experience, several recommendations can be formulated:
- Start small. When setting up a new server, first set conservative limits and watch the real consumption via lvetop, gradually adjusting the values.
- Do not remove limits unnecessarily. The
--unlimitedparameter is convenient for debugging, but on a production server an unlimited account is a risk to neighbors. - Use packages instead of manual configuration. Packages make configuration predictable: changing a package automatically changes the limits of all its users.
- Automate bulk operations. When migrating clients, use
apply-manyand JSON output - this eliminates human errors. - Verify changes. After each
setcommand, runlvectl limitsto make sure the limits were applied. - Monitor in advance. Regularly viewing lvetop allows you to notice resource "eaters" before they affect other clients.
- Do not forget about lveps. If a website is slow, lveps -p will show which processes are creating load inside the LVE.
Troubleshooting
LVE was not created
If lvectl set does not create an LVE, check:
- whether CloudLinux OS is installed and the kernel works correctly (the
lvectl lve-versioncommand); - whether you have sufficient rights (commands require root privileges);
- whether the UID conflicts with an existing environment (the
lvectl listcommand).
Limits are not applied
If the limits did not take effect after lvectl set, force the application:
lvectl apply 504
If necessary - for all environments:
lvectl apply all
Invalid input during bulk operation
The apply-many command silently skips invalid lines in stdin. Check the UID list formation before applying, for example, by outputting it to a separate file and reviewing it.
Reseller issues
After changing the reseller structure (moving users), always run lvectl sync-map, otherwise LVP limits may be applied incorrectly.
Conclusion
The lvectl utility is a fundamental administration tool for CloudLinux OS. Understanding its commands and parameters is necessary for every hosting administrator working with CloudLinux: it is through lvectl that LVEs are created and configured - lightweight virtualized environments that guarantee server stability under shared hosting.
The key capabilities of the utility include setting CPU limits (--speed), physical (--pmem) and virtual (--vmem) memory, disk I/O (--io, --iops), process counts (--nproc, --maxEntryProcs), as well as working with packages, resellers (LVP) and binary files. Combined with the monitoring utilities lvetop and lveps, lvectl forms a complete resource management loop: configuration, application, observation, diagnostics.
Modern lvectl versions support JSON output, allowing limit management to be embedded into monitoring and billing systems, automating routine tasks. Knowledge of the utility remains in demand in 2026: LVE remains the foundational technology of CloudLinux OS, and lvectl - its primary command-line interface.
Summary
- LVE (Lightweight Virtualized Environment) - CloudLinux technology for isolating user resources on shared hosting servers.
- lvectl - the command-line utility for managing LVE: creating, deleting, setting limits, working with packages and resellers.
- Main limits: CPU (
--speed), physical memory (--pmem), virtual memory (--vmem), disk I/O (--io,--iops), processes (--nproc,--maxEntryProcs). - Key commands:
set,set-user,apply,apply-many,limits,list,delete,destroy,package-set,set-reseller. - Monitoring: lvetop (current load by LVE) and lveps -p (processes inside the environment).
- Configuration is stored in
/etc/container/ve.cfg; JSON output is supported for automation. - Recommendation: use limit packages, verify changes with the
limitscommand, and runapply allafter manual configuration edits.
