{"id":2773,"date":"2012-11-09T08:28:00","date_gmt":"2012-11-09T07:28:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/"},"modified":"2012-11-09T08:28:00","modified_gmt":"2012-11-09T07:28:00","slug":"manage-template-manually-with-oracle-virtual-box","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/","title":{"rendered":"Manage templates manually with Oracle Virtual Box"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p><strong>So what if a consultant needs to make a demo to his client, only using his laptop without Internet access?<\/strong><\/p>\n<p>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.<br \/>\nTwo steps are necessary:<\/p>\n<p><strong>On the host side<\/strong><\/p>\n<p>A) First create a template machine on the host<br \/>\nB) Next create a configuration file which stores all information to customize the new virtual machine (template to use, new hostname, new IP&#8230;)<br \/>\nC) Finally, create and run a configuration script. This script will:<\/p>\n<ul>\n<li>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:<\/li>\n<\/ul>\n<p><code>\"C:Program FilesOracleVirtualBoxVBoxManage\" clonevm --name --basefolder --register<\/code><\/p>\n<ul>\n<li>attribute to each new virtual machine a shared folder (between the host and the new virtual machine). The Virtual Box command used is:<\/li>\n<\/ul>\n<p><code>\"C:Program FilesOracleVirtualBoxVBoxManage\" sharedfolder add --name --hostpath <\/code><br \/>\nThe specific parameters file is also generated by the script, for each new virtual machine.<\/p>\n<ul>\n<li>generate a specific parameter file into the shared folder. Simple OS command could be used for this step.<\/li>\n<li>start the new virtual machine. The Virtual Box command used is:<\/li>\n<\/ul>\n<p><code>\"C:Program FilesOracleVirtualBoxVBoxManage\" startvm --type headless<\/code><br \/>\nSee the Virtual Box manual to know more about available commands<br \/>\n<a href=\"http:\/\/www.virtualbox.org\/manual\/ch08.html\">http:\/\/www.virtualbox.org\/manual\/ch08.html<\/a><\/p>\n<p><strong>On the guest side<\/strong><br \/>\nThe 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:<\/p>\n<ul>\n<li>access the shared folder<\/li>\n<li>read the specific parameters file and get values from it<\/li>\n<li>launch system commands (such as hostname changing) to customize the new virtual machine<\/li>\n<li>restart the new virtual machine to achieve the customization<\/li>\n<\/ul>\n<p>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.<\/p>\n<p>The following schema illustrates the different steps on host and guest sides:<\/p>\n<p><i><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png\" alt=\"schema_templates_vbox\" width=\"600\" height=\"316\" \/><\/i><\/p>\n<p>Such a solution offers several advantages for a consultant:<\/p>\n<ul>\n<li>This is a mobile solution: people can locally manage environments without Internet access.<\/li>\n<li>This is a free and durable solution: Oracle Virtual Box is free and regularly updated (4.1.22 released on 2012 7th September)<\/li>\n<li>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<\/li>\n<\/ul>\n<p>It is just limited by laptop capacities, in term of disk and memory.<\/p>\n<p>Note that it cannot be used to make complex virtualized environments, because concurrent access on disk will considerably reduce performances of each virtual machine.<\/p>\n<p>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\u2019s network is necessary. Only a powerful laptop and a switch are required!<\/p>\n<p>In a future article, I will detail the content of each script, using an example based on a real situation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":2774,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[199],"tags":[295,291,335,266],"type_dbi":[],"class_list":["post-2773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hardware-storage","tag-hyper-v","tag-oracle-virtual-server","tag-virtual-box","tag-vmware"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Manage templates manually with Oracle Virtual Box - dbi Blog<\/title>\n<meta name=\"description\" content=\"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.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manage templates manually with Oracle Virtual Box\" \/>\n<meta property=\"og:description\" content=\"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.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-09T07:28:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3772\" \/>\n\t<meta property=\"og:image:height\" content=\"1983\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Manage templates manually with Oracle Virtual Box\",\"datePublished\":\"2012-11-09T07:28:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\"},\"wordCount\":608,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png\",\"keywords\":[\"Hyper-V\",\"Oracle Virtual Server\",\"Virtual Box\",\"VMware\"],\"articleSection\":[\"Hardware &amp; Storage\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\",\"name\":\"Manage templates manually with Oracle Virtual Box - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png\",\"datePublished\":\"2012-11-09T07:28:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"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.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png\",\"width\":3772,\"height\":1983},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manage templates manually with Oracle Virtual Box\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Manage templates manually with Oracle Virtual Box - dbi Blog","description":"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.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/","og_locale":"en_US","og_type":"article","og_title":"Manage templates manually with Oracle Virtual Box","og_description":"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.","og_url":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/","og_site_name":"dbi Blog","article_published_time":"2012-11-09T07:28:00+00:00","og_image":[{"width":3772,"height":1983,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png","type":"image\/png"}],"author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Manage templates manually with Oracle Virtual Box","datePublished":"2012-11-09T07:28:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/"},"wordCount":608,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png","keywords":["Hyper-V","Oracle Virtual Server","Virtual Box","VMware"],"articleSection":["Hardware &amp; Storage"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/","url":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/","name":"Manage templates manually with Oracle Virtual Box - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png","datePublished":"2012-11-09T07:28:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"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.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/schema_templates_vbox.png","width":3772,"height":1983},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/manage-template-manually-with-oracle-virtual-box\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Manage templates manually with Oracle Virtual Box"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/2773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=2773"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/2773\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/2774"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=2773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=2773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=2773"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=2773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}