Howto: Re-create/re-install a VPS

How to re-create/re-install a OpenVZ VPS?

1) Make a backup of the configuration file:

cp -p /etc/sysconfig/vz-scripts/VEID.conf  /etc/sysconfig/vz-scripts/VEID.conf_old

2) Stop the VPS:

vzctl stop VEID

3) Destroy/Terminate the VPS:

vzctl destroy VEID

4) Create the VPS using the OS templates stored under /vz/template/cache directory:

vzctl recreate VEID –ostemplate os-template-name

5) Copy the original configuration file back to have the original parameters:

cp -p /etc/sysconfig/vz-scripts/VEID.conf_old /etc/sysconfig/vz-scripts/VEID.conf

6) Start the VPS and reset the password

vzctl start VEID
vzctl set VEID –userpasswd root:password –save

This entry was posted on Tuesday, October 13th, 2009 and is filed under VPS Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.