To update the configuration settings of an OpenVZ container, you need to manually edit the container’s configuration file located in /etc/vz/conf. Alternatively, you can use the ‘vzctl’ command line tool to update the settings of a running container. Here are the steps:
First, you need to login to the host node server via SSH.
Then, you will find the container’s ID by running the following command:
```
vzlist
```
Suppose the ID of the container is 101 and you want to update the disk quota for the container. You can do so by running:
```
vzctl set 101 —diskspace 10G:11G —save
```
This command will set the soft limit of the disk space to 10GB and the hard limit to 11GB. The soft limit is the maximum amount of disk space that the container can use. Once the soft limit is reached, only the root user can allocate more disk space up to the hard limit. The hard limit is the absolute maximum amount of disk space that the container can use.
Other notable settings that can be changed include:
CPU Units:
```
vzctl set 101 —cpuunits 1000 —save
```
RAM size:
```
vzctl set 101 —ram 2G —save
```
CPU cores:
```
vzctl set 101 —cpus 2 —save
```
Remember to replace ‘101’ with your actual container ID. The ‘—save’ option saves changes to the configuration file so they persist after a reboot.
To apply the changes, you should restart the container:
```
vzctl restart 101
```
Besides adjusting resource parameters, you can also change other configuration settings such as the network settings, the root password, and the number of processes allowed, etc. Refer to the OpenVZ documentation for a full list of configurable parameters.
Remember, before making any changes, it’s a good idea to backup the original configuration files so you can easily restore them if something goes wrong.