Move openvz containers from local storage to shared storage

jinjer

Renowned Member
Oct 4, 2010
204
7
83
I would like to move some openvz containers from a local directory to another local directory which is on shared storage, for HA purposes.

I think that it is not possible to do so using the web interface, so I'm trying to do it manually.

The VZ root directory is in the /etc/pve/openvz/<pveid>.conf configuration file:

VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/var/lib/vz/private/$VEID"

Is there anything to do, other than just moving data to another place and change the pveid.conf file accordingly?

Thank you,
jinjer.
 
yes, you are right - that's currently not possible not via gui;

you also need to check for vzqouta in /var/lib/vzquota and delete it because it contains the old storage path
vzquota drop <pveid>

a new one will be generated next time you start your vm;