Oracle VM templates, the easy way – Part 1of3 Creating the template

This will be a short a sweet, at the request of several folks that wanted to know how to create Oracle VM templates without using the template builder. Part 1 will show how to make the template using Virtual Box. Part 2 will show how to import this into an Oracle Database Appliance, and Part 3 will show how to use the same file for a more traditional Oracle VM deployment, as found on a VCA.

While I will use Oracle Linux, the same basic process works for Windows to!

First, we need to create a VM in VirtualBox.

Select New form the VBox Menu

Select the name and operating system. In this case we will use Linux, 64-bit for the OS.

Set the memory, for this example small is fine. We can always grow it later.

Now we setup the virtual disk. For this example, it will be a small disk. Also as a note, on the ODA,

there is currently no sparse disks, so a 200G disk will consume 200G of disk space!

VDI should be fine for now. We will setup a small disk for this test.

Now we have a VM, we need to make a few small changes.

Go to System, the change the vCPU to 2. This makes the install run faster. When we deploy we can always

add more CPU as needed.

For now we will use a NAT address, when we deploy on an ODA or under OVM we will change it to a static IP.

An ISO helps to boot from, so we can install the OS.

Chose the disk

Using Linux 7 for this sample.

Now start the VM

And run the installer

English for this sample

All we need to do here is enable the NIC, makes it easier to install RPMs from the Oracle yum servers if need be.

Make sure it is ON. DHCP will be automatically configured. We can use this to install a few RPMs if needed

Now click “Begin Installation”

While the installer runs, set the root password and initial user

When both are set, you will be here.

Once done, shutdown the VM.

Select power off

Now we need to unmount the ISO. Go into settings, and under storage delete the ISO.

So it now should only have one disk, like this

Now bring the VM back up.

Now, we need to do one thing to make life easier. Remove the MAC address from the interface. To do this login,

and cd /etc/sysconfig/network-scripts and vi the file ifcfg-enp0s3. This will make it easier down the road. On OL6, there

is an API in OVM that can automate this. Hopefully we will see the API release for OL7 soon.

The file should look similar to this when done. Verify that ONBOOT=yes, and that HWADDR is #ed out.

Now shutdown the VM.

Next we will export the VM. Make sure it is powered off in Vbox.

Select File -> Export Appliance

Highlight the VM to export.

Select the format, I use OVF 1.0

In the settings we can add some META data, but for now click export.

The system will not export an OVF file. We can use this to import this into OVM based systems like ODAs,

VCAs, NMSs and traditional OVM systems.

Congratulations, the file is now in your Documents directory. Next up is using it on an Oracle Database Appliance.

11 Replies to “Oracle VM templates, the easy way – Part 1of3 Creating the template”

  1. Hi Erik
    Some questions.
    Any specific reason for vdi file, or is a vmdk fine ?

    You mention in OL6 there is a API to remove the MAC address ?

    Export Format, specific reason for OVF 1.0? or can a newer version be used with the ODA ?

    G

    • I have seen issues with vdmk files, so I stick with vdi.

      Yes, with the API (ovm_vmmessage command) you can get and put the MAC address.

      OVF format… I have not used the newer format, will try that when I have a free day.

    • Working on a new book about OVM and will cover that in the book.
      Publishers don;t like content in two places… sorry.

    • Thanks for the spell check! Being in Tennessee you should know those of us in the South occasionally have issues with grammar and such!

  2. I don’t see a topic in the book(Oracle VM 3 Cloud Implementation and Administration Guide, Second Edition) regarding this?? can you please tell me which chapter we have to refer? I’m interested in how we can use this exported vm file in ovm/pca.

    • Chapter 15, page 225 describes how to manually extract a template or appliance from an OVzm system to import it into another OVzm system.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.