OpenVZ template conversion fails: def writeconfig(configfile, configtext, configmode=0644)

Have more questions? Submit a request

Applicable to:

  • SolusVM

Symptoms 

Conversion of OpenVZ template fails:

CONFIG_TEXT: File "/usr/libexec/ovz-template-converter", line 36
def writeconfig(configfile, configtext, configmode=0644):
^
SyntaxError: invalid token

Cause

Convertion script is not adopted for python36.

Resolution

  1. Connect to OpenVZ node via SSH
  2. Rename the script /usr/libexec/ovz-template-converter:

    # mv /usr/libexec/ovz-template-converter{,.orig}

  3. Replace the script /usr/libexec/ovz-template-converter with the one from attachment:

    # cd /usr/libexec/
    # rm -f ovz-template-converter
    # wget -O ovz-template-converter https://raw.githubusercontent.com/solusvm-support/svm_patches/master/ovz-template-converter.patched
    # chmod +x /usr/libexec/ovz-template-converter

  4. Install the package python36-pip:

    # yum install python36-pip

  5. Install configobj module:

    # pip3 install configobj

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.