How to create a template in OpenVZ Virtuozzo 7 using standard(legacy) OpenVZ 6 template to use in SolusVM?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to create a template in OpenVZ Virtuozzo 7 using standard(legacy) OpenVZ 6 template to use in SolusVM?

Answer

Use the OpenVZ 6 pre-created template on the Virtuozzo 7 host-node which automatically converts the pre-created template to the EZ template by running the command during the VPS creation from the SolusVM.

  1. Access OpenVZ 7 node via SSH
  2. Download a standard(legacy) OS template (for example, centos 7 minimal):

    # cd /vz/template/cache/
    # wget http://download.openvz.org/template/precreated/centos-7-x86_64-minimal.tar.gz

  3. Convert the template so that it can be used by OpenVZ 7 with the command:

    # /usr/libexec/ovz-template-converter --verbose /vz/template/cache/centos-7-x86_64-minimal.tar.gz

    Note: if conversion fails with error def writeconfig(configfile, configtext, configmode=0644), use patched file from this article

  4. To use the converted template in SolusVM it is required to create corresponding tar.gz file. Create a new container using OpenVZ native tools:

    # vzctl create 999999 --ostemplate centos-7-x86_64-minimal

  5. Change directory to the container's private area:

    # cd /vz/private/999999/

  6. Pack a template with the name structure as {distribution}-{release}-{arch}-{custom}.tar.gz:

    # tar -cvzpf /vz/template/cache/centos-7-x86_64-test.tar.gz .

    Note: dot at the end of the command query above is a mandatory after space

After that the newly created template can be used for deploying VPSes on OpenVZ 7 via from Admin panel.

 

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.