If you need to create an exact copy of an existing VE, these are the steps to make.
Quote:
# OLDVE=222 NEWVE=333 # Just an example
# vzctl stop $OLDVE
# mkdir /vz/root/$NEWVE
# cp /etc/vz/conf/$OLDVE.conf /etc/vz/conf/$NEWVE.conf
# cp -a /vz/private/$OLDVE /vz/private/$NEWVE
# vzctl start $NEWVE; vzctl start $OLDVE
|
The problem is copying the VE using the cp with -r and -a flag which does not preserve the permssions and ownership of the files.
In this case use following steps :
Quote:
#mkdir /vz/private/new_VEid
#cd /vz/private/old_VEID
#tar cf - * | ( cd /vz/private/new_VEid tar xfp -)
#cp old_VEID.conf new_VEID.conf
|
That's all!
------------------------
Best Regards,
UKShane
http://www.eukhost.com
Enjoy