vzmigrate: fixing "quota is running, stop it first" error
When migrating a Virtuozzo VPS from one node to another using vzmigrate one might receive this error message:
# vzmigrate –keep-dst –remove-area no 192.168.0.1 1001
Connection to destination HN (192.168.0.1) is successfully established
Moving/copying VE#1001 -> VE#1001, ,  …
destination ‘/vz/root/1001’ for VE#1001 already exists
destination ‘/vz/private/1001’ for VE#1001 already exists
Syncing private area ‘/vz/private/1001’
| 100% |********************************** done
Can’t move/copy VE#1001 -> VE#1001, ,  : Starting VE …
Setting quota …
vzquota: Running vzquota init failed for VE#1001.
vzquota : (error) Quota is already running for VE#1001, stop it first.
Fixing this involves a little handwork on the destination hardware node.
- Check using ‘vzlist’ if a VPS #1001 exists (should not)
- Check if directory /vz/root/1001 existsÂ and remove it
- Check if directory /vz/private/1001 exists and rename it to /vz/private/1001.migrated (deleting the directory is fine too)
In case you did not run ‘vzmigrate’ with ‘–keep-dst’ argument, step #3 may be omitted as this directory shouldn’t exist then.
- Disable the quoata: ‘vzquota of 1001 -f’ (yes, it will complain, but that’s ok)
- Try again migrating your VPS to the new node
As always YMMV. It worked for me when running ‘vzmigrate’ just as shown above. To be honest: This particular error happened only twice for some 50 or 60 VPS’s migrated and was likely caused by network timeouts.