There are containers
CTID NPROC STATUS IP_ADDR HOSTNAME
101 19 running 127.0.0.2 test1
102 19 running 127.0.0.3 test2
You need to assign a hostname .= the ip of the container
You can make your hands in the form :
vzctl set 101 --hostname "127.0.0.2" --save
Choose the required field is id and ip, but this is the line, how to separate while loop?