Untested but the following should work
Assume 1234 is the old veid and 5678 is the new one
vzctl stop 1234
mv /vz/root/1234 /vz/root/5678
mv /vz/private/1234 /vz/private/5678#
mv /var/vzquota/quota.1234 /var/vzquota/quota.5678
mv /etc/sysconfig/vz-scripts/1234.conf /etc/sysconfig/vz-scripts/5678.conf
vzctl start 5678
Also check /etc/sysconfig/vz-scripts/5678.conf to see if VE_ROOT or VZ_PRIVATE are set to 1234
You can just use something like
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
As well in the configuration