Blog - comments

I am wondering what steps ( user and group creation, package installation, network setup etc.) you h...
I think there are two camps here- one camp wants to stick to VMWare- and interpret all guidelines, a...
John Smith
Hi,From Document : " Oracle® Enterprise Manager Cloud Control Upgrade Guide -- 12c Release 4 (12.1.0...
Harry Taieb
Yeah.! You did a great article and we need some descriptive on this presentation to understand clear...
SharePoint 2013 Online Training

hi i am also facing the same issue please tell me how u resolved this.

sandeep singh
Blog Michael Schwalm Manage templates manually with Oracle Virtual Box

dbi services Blog

Welcome to the dbi services Blog! This IT blog focuses on database, middleware, and OS technologies such as Oracle, Microsoft SQL Server & SharePoint, EMC Documentum, MySQL, PostgreSQL, Sybase, Unix/Linux, etc. The dbi services blog represents the view of our consultants, not necessarily that of dbi services. Feel free to comment on our blog postings.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Bloggers
    Bloggers Search for your favorite blogger from this site.

Manage templates manually with Oracle Virtual Box

To create environments for testing, development, or demonstration, several identical virtual machines are required. Use a technology as VMware vSphere or Microsoft Hyper-V, for implementing a dedicated virtualized infrastructure and use templates, would be the best choice.

This solution offers both advanced administration and security capabilities, and allows a centralized access for users. However such an infrastructure needs dedicated servers and networks and could represent high costs. Furthermore it is not always usable from outside the company.


So what if a consultant needs to make a demo to his client, only using his laptop without Internet access?

I searched for a free solution to create easily multiple identical virtual machines on my laptop. To do that, I tried to manage templates with Oracle Virtual Box and found an easy solution, that I wanted to share with you. It consists in one script created on the host, and one script created on the template.

Two steps are necessary:


On the host side

A) First create a template machine on the host

B) Next create a configuration file which stores all information to customize the new virtual machine (template to use, new hostname, new IP...)

C) Finally, create and run a configuration script. This script will:

  • create one or more virtual machines based on the template, reading lines registered on the configuration file. The Virtual Box command used for each line is:

"C:\Program Files\Oracle\VirtualBox\VBoxManage" clonevm --name --basefolder --register

  • attribute to each new virtual machine a shared folder (between the host and the new virtual machine). The Virtual Box command used is:

"C:\Program Files\Oracle\VirtualBox\VBoxManage" sharedfolder add --name --hostpath

The specific parameters file is also generated by the script, for each new virtual machine.

  • generate a specific parameter file into the shared folder. Simple OS command could be used for this step.
  • start the new virtual machine. The Virtual Box command used is:

"C:\Program Files\Oracle\VirtualBox\VBoxManage" startvm --type headless


See the Virtual Box manual to know more about available commands


On the guest side

The guest is started automatically by the previous script. At its first startup, a local script previously created on the template is run. This script will:

  • access the shared folder
  • read the specific parameters file and get values from it
  • launch system commands (such as hostname changing) to customize the new virtual machine
  • restart the new virtual machine to achieve the customization

This script can include all actions you need, for example renaming the hostname, changing network configuration, but required parameters must be registered on the specific parameters file.

The following schema illustrates the different steps on host and guest sides:


Such a solution offers several advantages for a consultant:

  • This is a mobile solution: people can locally manage environments without Internet access.
  • This is a free and durable solution: Oracle Virtual Box is free and regularly updated (4.1.22 released on 2012 7th September)
  • This is an easy way to create multiple machines without fastidious actions: people just need one script and one configuration file to generate multiple identical virtual machine

It is just limited by laptop capacities, in term of disk and memory.

Note that it cannot be used to make complex virtualized environments, because concurrent access on disk will considerably reduce performances of each virtual machine.

dbi services chose this solution to create small training environments. It allows to generate new environments for each session using identical templates, and allows each consultant to offer a training everywhere: no need to transport big servers, and no connection to the client’s network is necessary. Only a powerful laptop and a switch are required!

In a future article, I will detail the content of each script, using an example based on a real situation.

Rate this blog entry:

Michael Schwalm is Consultant at dbi Services and has more than two years of experience in Oracle database administration. He has a broad knowledge in the realization of virtualization infrastructures such as vMware vSphere. He took his first steps in database administration as an integrator of a web applications on Unix, Oracle, and Websphere environments. Michael Schwalm is Oracle Certified Professional 11g and RAC Implementation Specialist 11g. Prior to joining dbi services, Michael Schwalm was application administrator at SOGETI Est (F) on behalf of PSA Peugeot Citroen and responsible for the realization and managing of Unix environments and Oracle databases in the context of migration projects. Michael Schwalm holds a BTS diploma in Information System Management from Belfort (F) and a TSAR diploma in advanced network administration from Strasbourg (F). His branch-related experience covers Automotive, Software industry, Financial Services / Banking, etc.


  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest Monday, 06 July 2015
AddThis Social Bookmark Button
Deutsch (DE-CH-AT)   French (Fr)


Contact us now!

Send us your request!

Our workshops

dbi FlexService SLA - ISO 20000 certified.

dbi FlexService SLA ISO 20000

Expert insight from insiders!

Fixed Price Services

dbi FlexService SLA - ISO 20000 certified.

dbi FlexService SLA ISO 20000

A safe investment: our IT services at fixed prices!

Your flexible SLA

dbi FlexService SLA - ISO 20000 certified.

dbi FlexService SLA ISO 20000

ISO 20000 certified & freely customizable!

dbi services Newsletter