Server Administration & Management

How to clone or copy a VPS in Virtuozzo

Virtouzzo provides a shell utility named ‘vzmlocal‘ , it can be used to clone a vps and comes handy in many situations. There are multiple reasons for which you may want to clone a vps, like :

* clone a vps before doing any major installation or changes within vps, so it can be reverted back in case something goes wrong
* clone a vps or vps template to create a new vps with same OS and applications, e.g. a clone for cPanel vps template to create a new cPanel vps
* to create a exact replica of a vps to be used as redundant copy of the vps

Lets see how we can use this command to create a vps clone :


above is general syntax , a real time example would be :

#vzmlocal -C 145:245
Moving/copying Container#145 -> Container#245, [], [] …
Syncing private area ‘/vz/private/145′->’/vz/private/245’

Successfully completed

The above command will create the exact replica of VPS with id 145 into a new VPS who’s id will be 245

Additional parameters can be used as per requirement , some of the command parameters are below :

 -s, –fast-sid : allows to speed up cloning process

-d, –destroy-source : destroys the source container after making a clone

-l, –skiplock : allows to clone the locked containers

October 22, 2011 Posted by | Virtualization, Virtuozzo | , , | Leave a comment