Update a container and then make copies

UserIsNew

New Member
Jul 29, 2014
9
0
1
hey guys
i have a centos container configured the way i want it
and now i would like to create copies
and change ip address etc

cp -r /var/lib/vz/private/100/ /var/lib/vz/private/101
cp /etc/vz/conf/100.conf /etc/vz/conf/101.conf

and edited the 101.conf

what all do i need to change in it ?
i changed ip and mac and it didnt boot

thanx all
 
Hello UserIsNew

cp -r /var/lib/vz/private/100/ /var/lib/vz/private/101
cp /etc/vz/conf/100.conf /etc/vz/conf/101.conf

In principle ok but the first cp command has to be slightly different.

Here is an example, I created container 1094 by copying it from 1093, in my case the storage is /mnt/pve/vpx and directory for configuration files /etc/pve/openvz:

Code:
cp -a -v /mnt/pve/vpx/private/1093/ /mnt/pve/vpx/private/1094
cp /etc/pve/openvz/1093.conf /etc/pve/openvz/1094.conf

Then I edited 1094.conf:

- all where I found "1093" I changed it to "1094"

- changed the mac- and IP-addresses to new values

That´s all

Kind regards

Mr.Holmes
 
Last edited: