websavers / centos2alma_openvz

A CentOS 7 to AlmaLinux 8 conversion utility for OpenVZ / Virtuozzo containers running Plesk
GNU General Public License v3.0
3 stars 0 forks source link

vzctl snapshot creation #1

Open d6v3w opened 2 months ago

d6v3w commented 2 months ago

Virtuozzo release 7.5.4 (465)

Had a problem with this part of the code on almaconvert8-plesk;

snaphost_out = subprocess.check_output(['/bin/prlctl', 'snapshot', ct, '-n', 'Pre-Almalinux8', '-d', 'Created automatically by almaconvert8 tool at %s' % now]) snaphost_out = subprocess.check_output(['/sbin/vzctl', 'snapshot', ct, '--name', 'Pre-Almalinux8', '-d', 'Created automatically by almaconvert8 tool at %s' % now])

changed it to

snaphost_out = subprocess.check_output(['/bin/prlctl', 'snapshot', ct, '-n', 'Pre-Almalinux8', '-d', 'Created automatically by almaconvert8 tool at %s' %now]) snaphost_out = subprocess.check_output(['/sbin/vzctl', 'snapshot', ct, '--name', 'Pre-Almalinux8']) removed the space between % and now]) removed the -d from the vzctl line as vzctl snapshot doesn't accept a description.

d6v3w commented 2 months ago

Fixed this by removing /root/almaconvert8-plesk rm -f /root/almaconvert8-plesk

uninstall vzdeploy8 yum remove vzdeploy8

installed an earlier version; yum install vzdeploy8-1.0.61-10.vl7

And ran the script again.

jas8522 commented 2 months ago

This is all stuff I never encountered. The version of vzdeploy installed when I ran my conversions (test and live) has been vzdeploy8-1.0.64-1.vz7.noarch

I suspect this is because prlctl works on our systems and so it doesn't need to fallback to the vzct 'except' part - do you not have it? Is it a very old version of OpenVZ?

It should work with --description rather than -d -- could you try that to confirm? If it does, then I'd recommend creating a bug report at https://bugs.openvz.org indicating that the vzctl switch is used wrong!