Creating OS Template with Pre-Installed Plesk

Provisioning of VPSs with Plesk can take significant time. Most of the time, required for Plesk provisioning in VPS, is spent on downloading and installation of Plesk in pure VPS. To speed up the process you can prepare OS templates of virtual servers with already installed Plesk. In addition, the use of such OS templates allows to avoid any errors that may occur during Plesk installation regarding the instability of network or the specific configuration of operating system.

Note: Using OS template with pre-installed Plesk implies that the set of components will be exactly the same as selected during the creation of pre-installed Plesk.

Do the following:

  • Create container (CT) / virtual machine (VM)
  • Install Plesk
  • Create OS template

You can perform these actions via SSH or Virtuozzo Automator. Below you will see the following solutions: CT solution via SSH, VM solution via Virtuozzo Automator.

Step 1. Create a virtual server

Container solution

  1. Log in to Virtuozzo node as root via SSH.
  2. Create a container, install OS in it, configure network settings, verify that the container has Internet connection, define hardware configuration, specify the descriptive name of the container, start and enter the container. To learn more about managing containers, refer to Virtuozzo User’s Guide >> Managing Virtual Machines and Containers section.

Virtual machine solution

  1. Install Virtuozzo Automator on Virtuozzo node if it wasn’t installed earlier with Virtuozzo, for details refer to Virtuozzo Automator Installation Guide.
  2. Log in to Virtuozzo Automator. Create a new virtual machine, install OS in it, configure network settings, and define hardware configuration. Start and enter the virtual machine. For detailed information about managing virtual machines in Virtuozzo Automator, refer to Virtuozzo Automator Administrator’s Guide >> Managing Virtual Environments > Managing Virtual Machines section.

Step 2. Install Plesk

For Linux CT/VM

  1. Run Plesk installation:
    1. Download Plesk installer
      # wget http://autoinstall.plesk.com/one-click-installer
    2. Allow one-click-installer file execution
      # chmod +x one-click-installer
    3. Run one-click-installer
      # ./one-click-installer
  2. Initialize Plesk. There is no difference what values will be used for Plesk initialization since all these data will be reset at step 3. To learn more about the init_conf options and parameters, refer to the Reference for Command-Line Utilities (Plesk for Linux).
    # PSA_PASSWORD=setup /usr/local/psa/bin/init_conf --init -company "NeverHood" -name admin -passwd '' -phone 1234567890 -fax 1234567890 -email your@email.com -address 'address line 1' -city London -state 'London' -zip 630124 -country GB -send_tech_announce true -send_announce true -admin_info_not_required true -license_agreed true -encrypted-password -hostname 'test.tld'
  3. Prepare Plesk instance for cloning. After running the following command, Plesk instance will discover actual IP addresses and reconfigure its IP pool each time you restart the corresponding virtual machine.
    # ./usr/local/psa/bin/ipmanage --auto-remap-ip-addresses true
  4. Reset configuration using cloning utility.
    # ./usr/local/psa/bin/cloning --update -prepare-public-image true -reset-init-conf true -reset-license true
  5. Exit the container/virtual machine.
  6. Stop the container/virtual machine.

For Windows VM

  1. Run Plesk installation. To learn how to do it, refer to Plesk Deployment Guide.
  2. Initialize Plesk. There is no difference what values will be used for Plesk initialization since all these data will be reset at step 3. To learn more about the init_conf options and parameters, refer to the Reference for Command-Line Utilities (Plesk for Windows).
    # "%plesk_dir%bin\init_conf.exe" --init -company "NeverHood" -name admin -passwd "setup1Q" -phone 1234567890 -fax 1234567890 -email your@email.com -address "address line 1" -city London -state "London" -zip 630124 -country GB -send_tech_announce true -send_announce true -admin_info_not_required true -license_agreed true -hostname "test.tld"

    %plesk_dir% – the name of system environment variable that Plesk sets up on Windows to simplify access to its directories. It is a path to Plesk installation directory (for example, C:\Program Files (x86)\Parallels\Plesk).

  3. Prepare Plesk instance for cloning. After running the following command, Plesk instance will discover actual IP addresses and reconfigure its IP pool each time you restart the corresponding virtual machine.
    # %plesk_cli%\ipmanage --auto-remap-ip-addresses true
  4. Reset configuration using cloning utility.
    # "%plesk_dir%bin\cloning.exe" --update -prepare-public-image true -reset-init-conf true -reset-license true
  5. Exit the virtual machine.
  6. Stop the virtual machine.

Step 3. Create OS template from the virtual server

For container via SSH

Run the command:

# prlctl set <ctid> --template yes

For virtual machine in Virtuozzo Automator

For details refer to Virtuozzo Automator Administrator’s Guide >> Managing Virtual Environments > Managing Virtual Machines > Managing Virtual Machine Templates section.

Step 4. Include OS template in VPS Hosting service template

  1. Discover prepared OS template.
    1. You need to discover the newly created OS template in order to use it in CloudBlue Commerce. Refer to the Registering OS Templates via the Built-In Discovery Feature section for the instructions.
    2. While configuring OS template parameters specify the Edition to differentiate it later in virtual server template. For example, CentOS-with-Plesk12.
  2. Create virtual server template.

    Create a new virtual server template on the basis of the newly discovered OS template. Refer to the Configuring VPS Virtual Server Template section for the instructions.

  3. Create Plesk configuration.

    Create your own Plesk configuration and set up all the parameters according to Plesk, which was installed in VPS. To learn more about creating Plesk configuration, refer to the Creating Plesk Configuration section.

  4. Create VPS Hosting service template.

    Include the newly created virtual server template to the VPS Hosting service template. To learn more about creating VPS Hosting service template, refer to the Configuring VPS Hosting Service Template section.