Symptoms

This article describes how to properly create an application template for a program that requires a Role or Feature to be installed as a prerequisite.

In some cases, for correct application functioning, it is necessary to have certain server roles or features installed, e.g., IIS Role for MSSQL Server.

Parallels Virtuozzo Containers for Windows allows you to create application templates. If the application (for which the template is created) requires a certain role to be installed, follow the below steps to create a properly functioning template.

Resolution

  1. Launch the Template Creation Wizard (TCW) from Start > All programs > Parallels > Parallels Virtuozzo Containers > Parallels Virtuozzo Containers Template Creation Wizard.

  2. Select 'Create a template on the basis of installed application' and click 'Next'.

  3. Enter the temporary container settings (make sure you have specified a sufficient amount of disk space) and click 'Next'.

  4. Specify the path to the application distribution and template name. Click 'Next'.

  5. When you see the screen below, click 'Next'.

  6. The Remote Desktop Connection window should appear. Now you can install all required roles using the Add/Remove Role wizard

  7. When all roles are successfully installed and all pre-conditions for the application are met, switch back to the Hardware Node desktop and click 'Next'

  8. When you see the screen below, do not click 'Next', but switch to the container RDP window and perform the application installation.

  9. When the application is installed, switch back to the Hardware Node desktop and click 'Next'.

  10. After TCW finishes creating the snapshot of the installed application, it will be possible to modify the files and registry settings if needed. When done, click 'Next'

  11. It will then be possible to select the applications that should be removed from the container upon the template's removal.

  12. After that, the template settings screen will allow you to configure the template name, version, and its dependencies on other templates. Click 'Next'.

  13. TCW will also suggest installing the newly created template on the Node, which can be done later by running vzpkgdeploy -i <TEMPLATENAME>. Click 'Next' and this will complete the template's creation.

Now if someone tries to install the template without the required role preinstalled, the dependency error will be thrown:

 C:\Users\Administrator>vzpkgadd 101 mssql_2008_express-2008
 Adding template mssql_2008_express-2008 to container 101...
 ERROR: Template 'mssql_2008_express-2008/20120207' requires roles Web-Static-Con
 tent Web-Default-Doc Web-Dir-Browsing Web-Http-Errors Web-Http-Logging Web-Reque
 st-Monitor Web-Filtering Web-Stat-Compression Web-Mgmt-Console RSAT-Web-Server
 ERROR: Template 'mssql_2008_express-2008/20120207' dependencies not satisfied in
 container 101
 C:\Users\Administrator>

Internal content