Follow the steps listed below to set a static IP to an OpenVZ container.
1. Assume a container with CTID `101`, you can replace it according to your case.
1. Stop the OpenVZ container:
```
vzctl stop 101
```
1. Set up a new IP:
```
vzctl set 101 —ipadd 192.0.2.1 —save
```
Remember to replace `192.0.2.1` with the IP address you want to set.
1. If you want to delete the old IP:
```
vzctl set 101 —ipdel 203.0.113.1 —save
```
Replace `203.0.113.1` with the old IP address.
1. Now start your OpenVZ container:
```
vzctl start 101
```
1. You can then check your new configuration:
```
vzlist -a
```
The output should show that your changes have taken effect. Remember that you need to have the necessary permissions to perform these changes.