You can create a new template by clicking the New Template Project button.

You can search for a template by entering part or all of the template name in the Template Name field, and clicking Search. Similarly, you can display a list of templates for an operating system by selecting the operating system in the JeOS Image drop down and clicking Search. Or use both search criteria together to search for a template.

You can manage templates using the buttons at the top left of the Template Projects table. The buttons related to this table are:

Edit: Edits a template.

Copy: Copies the selected template and lists it in the Templates Projects table.

Build: Builds the selected template.

Delete: Deletes the selected template.

Clean Up: Removes the selected template image file and tarball. The template definition is not deleted.

6.1 Creating Templates

Oracle VM Template Builder uses JeOS to facilitate building an operating system instance with only the absolute minimum packages you need for a template. The operating systems you can select in Oracle VM Template Builder are derived from the available JeOS images. See Section 4.3, "JeOS Images" in Chapter 4, "Managing Resources"for more information on JeOS images.

To create an Oracle VM template, click New Template Project on the Template Projects screen. A template creation wizard guides you through the steps to create a template. The steps are:

This section of the wizard gives you fields to enter information to describe the template, manage version control, and manage End User Licence Agreements (EULAs). When you have completed this screen, click Next to continue.

Template Name

Enter a name for the template, for example, MyTemplate.

Template Version

Enter a version number for the template.

Vendor

Enter the name of the template vendor, for example, MyCompany.

JeOS Image

Select a JeOS image from the drop down list. This image is used to create the operating system for the guest virtual machine in the template. The list of operating systems is derived from the operating systems supported by JeOS. You cannot add to this list.

Description

Enter a description of the template.

End User License Agreement

If required, enter an End User License Agreement (EULA) to be included in the template.

To add an EULA, click Load EULA from file. The Add EULA screen is displayed. Enter the location for the EULA. The EULA location must be on your local machine. Click Save to load the EULA.

To remove an EULA, click Clear EULA. The EULA is removed from the template.

6.1.2 Adding Virtual Machine Hardware

The next step in creating a template is to enter the virtual machine hardware information for the template in the Virtual Machine Hardware screen.

This section of the wizard gives you fields to select the location for the operating system installation files to be used for the guest virtual machine in the template. The operating system source may be from a DVD ISO file, or a Yum repository. You can configure the available Yum repositories or DVD ISOs using the Resources tab. See Chapter 4, "Managing Resources" for more information on configuring resources. Select one option:

This section of the wizard gives you fields to select installation groups and additional software packages from the Yum repository or DVD ISO.

When you have completed this screen, click Next to continue

Available Groups

Select the installation group(s) for the guest virtual machine, for example, web-server and authoring-and-publishing. If there are no installation groups included in the Yum repository or DVD ISO, this option is not displayed.

Available Packages

Select any additional operating system packages required for the installation from the Available Packages column, for example, firefox. Click the shuttle arrow to move the packages into the Selected Packages column. Any dependent packages are not immediately marked to be added, but are installed when the template is built.

6.1.5 Adding Additional Software Packages and Template Script

The next step in creating a template is to upload any additional software packages that are not included in the Yum repository. You can also set template configuration and clean up scripts. These actions are performed on the Additional Software Packages screen

This section of the wizard enables to you add any additional software packages or applications, for example, the Oracle Database 10g Express Edition RPM, or application software configuration and clean up script RPMs. This screen also enables you to add the location of template configuration and clean up scripts in the guest virtual machine created by the template. When you have completed this screen, click Next to continue.

Additional Software Packages

To add an RPM, click Add. The Add Package screen is displayed. Select URL and enter an HTTP or FTP location for the RPM, or select Package file and enter the location on your local machine for the RPM. Click Save to add the RPM and return to the Additional Software Packages screen. The RPM is added to the guest virtual machine template.

To delete an RPM, select it in the box and click Delete. The RPM is removed from the guest virtual machine template.

Template Scripts

To include your own template configuration script, enter the script location in the Template configuration script field, for example, enter /u01/myconfig.sh.

To include your own template clean up script, enter the script location in the Template clean up script field, for example, enter /u01/mycleanup.sh.

This section of the wizard enables you to review and confirm the set up of the guest virtual machine to be created in the template, and to initiate a build of the project. A summary of the template is displayed in the Confirm Information screen showing:

The template name

The JeOS image on which to base the template

The amount of virtual memory

The number of virtual CPUs

The disk(s) to be included in the template, including the disk name, size, file system type and mount point

The operating system packages to be installed

The additional packages to be installed

Select Save to save the template and return to the Template Projects screen. You can build the template from the Template Projects screen.

Select Save and Build to save and build the template. The Template build screen is displayed. Click Refresh to display the latest information from the build log. Click Return to Template Projects page to return to the Template Projects screen. You can exit the build screen at any time and the build continues.

6.2 Building Templates

To build a template, select the template from the Template Projects table on the Template Projects screen and click Build. The Template build screen is displayed and shows the status of the template build process.

Click Refresh to display the latest information from the build log. Click Return to Template Projects page to return to the Template Projects screen. You can exit the build screen at any time and the build continues.

6.3 Accessing Templates

When you have created and built a template, Oracle VM Template Builder creates an archive (in .tar.gz format) of the template, and also creates a directory in which the system.img and vm.cfg file are located. You can access templates using the links in the Download column of the Template Projects table on the Templates screen.

6.4 Editing Templates

To edit a template, select the template from the Template Projects table and click Edit. Alternatively, click the link for the template in the Template Name column of the Template Projects table. The create template wizard is started. Edit the template as required.

6.5 Copying Templates

To copy a template, select the template from the Template Projects table and click Copy. A copy of the template is displayed in the table.

6.6 Deleting Templates

To delete a template, select the template from the Template Projects table and click Delete. The template is deleted from the table.

6.7 Cleaning Up Templates

You can remove template images and tarballs you may no longer require. The template definition remains, so you can rebuild the template image and tarball if and when required. Cleaning up templates makes available disk space for new templates to be built.

To clean up a template, select the template from the Templates Projects table and click Clean Up. The template image and tarball is deleted.