icon-arrow icon-check icon-mail icon-phone icon-facebook icon-linkedin icon-youtube icon-twitter icon-cheveron icon-download icon-instagram play close close icon-arrow-uturn icon-calendar icon-clock icon-search icon-chevron-process icon-skills icon-knowledge icon-kite icon-education icon-languages icon-tools icon-experience icon-coffee-cup
Werken bij Integration & Application Talents
Blog 23/08/2012

Using Oracle VM Template Builder to create your Guest VMs

Cloud

Whitehorses
Laurens van der Starre /
Integratie expert

In an Oracle (private) cloud, administrators and/or users can create Guest VMs based on Templates. These templates are basically guest OSes with often some pre-installed software, which takes the user through basic configuration steps at first boot (such as network settings etc). You can download these Templates from Oracle’s eDelivery cloud, but you can also create them yourself using Oracle VM Template Builder. (Note that there is also an Oracle VM Template Builder template on the eDelivery site).

A Template is built using an Oracle JeOS image  (Just enough OS), and then extending it with virtual disks, packages from Oracle’s public YUM reposities, and your own packages and scripts (if any). Let’s say you want to create a Oracle Enterprise Linux 5 update 8 Template.

Press the “New Template Project” from the main Template screen:

Creating a new Template using Oracle VM Template Builder

Creating a new Template using Oracle VM Template Builder

 

You can then name your Template, and choose the JeOS image it has to be based on. Note that the JeOS image defines whether the Template will be a HVM (Hardware Virtualized Machine) or PVM (Para Virtualized Machine).

Describe your Template

Describe your Template

 

Next is defining the (virtual) hardware. If you choose to keep the system disk small, you can add extra disks to the Template when needed.

Choose the hardware for the Template

Choose the hardware for the Template

 

Now we will specify a YUM repository for the packages that will be installed in the Template. This needs to be a compatible repository with the chosen JeOS image: if the JeOS is OEL5u8, then take the OEL5 latest (8+) for example.

Specify the YUM repository to use

Specify the YUM repository to use

 

Defining which packages from the YUM repository have to be installed into the Template has to be done in the following step. It will resolve the dependencies automatically. What to chose here depends on the usages of the Template. If you are creating a Template for a SOA Suite installation for example, you can select all required packages.

Choose OS packages

Choose OS packages

 

The next step is to define additional packages (from outside the YUM repository) that will be part of the Template.  You can for example add the Oracle JDK7 RPM as part of the Template:

Upload / add additional packages

Upload / add additional packages

 

Note that the URL can also be a local (to the) Oracle VM Template Builder machine. Every build project creates a /opt/ovmtb/uploads/<random string> directory. In you place your RPMs in that directory, you can refer to them using file://<etc> . You can also use HTTP of FTP of course.

JDK as additional package

JDK as additional package

 

The last page is the confirmation with the overview of the Template to be created.

Template overview

Template overview

By pressing “Save and Build” the Template will be build by the OVM TB daemon.

The result is a tarball with the Template:

Completed builds

Completed builds

 

The link to the “tarball” can be imported in Oracle VM Manager to add the Template to the Repository. In Oracle VM Manager you can then create a Guest VM from it. Even cooler: you can add this template to your Software Library in Oracle Enterprise Manager 12c Cloud Control. Self Service users can then utilize the template.

The Template has some cool first boot scripts build in. Wim Coekaerts has written a great post on that. Check it out.

Extra

If you use the Oracle VM Template Builder Oracle VM Template, it doesn’t come with the OEL 5u8 JeOS image. You can download these images from the eDelivery cloud. Copy the JeOS RPM to the Template builder machine, together with the RPMs that come with the “JeOS Base x86 and x86_64” download from eDelivery.

As root on the machine:

rpm -Uvh ovm-modify-jeos-1.1.0-16.el5.noarch.rpm
rpm -ivh ovm-el5u8-xvm-jeos-1.1.0-2.el5.x86_64.rpm

service ovmtb stop
service httpd stop
service ovmtb restart
service httpd restart

Adding YUM repositories to the Template builder is simple: just open the repo file (e.g. http://public-yum.oracle.com/public-yum-el5.repo) in your browser and add the baseurl of the version you want  as YUM repsository (replace the $basearch by “x86_64” for example). For example: http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/x86_64/ for x86 64bits.

Overzicht blogs

Geen reacties

Geef jouw mening

Reactie plaatsen

Reactie toevoegen

Jouw e-mailadres wordt niet openbaar gemaakt.

Geen HTML

  • Geen HTML toegestaan.
  • Regels en alinea's worden automatisch gesplitst.
  • Web- en e-mailadressen worden automatisch naar links omgezet.
Whitehorses
Laurens van der Starre /
Integratie expert

Wil je deel uitmaken van een groep gedreven en ambitieuze experts? Stuur ons jouw cv!