<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Micro-ISV Insights Blog &#187; virtual machine</title>
	<atom:link href="https://www.dextronet.com/micro-isv-insights/tag/virtual-machine/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dextronet.com/micro-isv-insights</link>
	<description>A blog for mISVs, startup maniacs, and everyone in the software business.</description>
	<lastBuildDate>Fri, 31 Jan 2014 18:30:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>Managing Virtual Machines Efficiently in VirtualBox</title>
		<link>https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/</link>
		<comments>https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 13:46:25 +0000</pubDate>
		<dc:creator>Michal Novak</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[virtual machine testing]]></category>
		<category><![CDATA[virtual machines with office versions]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.dextronet.com/micro-isv-insights/?p=659</guid>
		<description><![CDATA[Need to test a software application in different environments? Managing virtual machines can be extremely frustrating - unless you know how to do it in a smart way.<p><a href="https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/">Managing Virtual Machines Efficiently in VirtualBox</a> is a post from: <a href="https://www.dextronet.com/micro-isv-insights">Micro-ISV Insights Blog</a></p>
]]></description>
				<content:encoded><![CDATA[<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><div class='dd-google1-ajax-load dd-google1-659'></div><g:plusone size='tall' href='https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/'></g:plusone></div><div class='dd_button'><div class='dd-twitter-ajax-load dd-twitter-659'></div><a href="http://twitter.com/share" class="twitter-share-button" data-url="https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/" data-count="vertical" data-text="Managing Virtual Machines Efficiently in VirtualBox" data-via="" ></a></div><div class='dd_button'><script src="http://connect.facebook.net//all.js#xfbml=1"></script><fb:like href="https%3A%2F%2Fwww.dextronet.com%2Fmicro-isv-insights%2Fmanaging-virtual-machines-efficiently-in-virtualbox%2F"    layout="box_count" width="50"  ></fb:like></div><div class='dd_button'><div class='dd-linkedin-ajax-load dd-linkedin-659'></div><script type='in/share' data-url='https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/' data-counter='top'></script></div><div class='dd_button'><div class='dd-dzone-ajax-load dd-dzone-659'></div><iframe class='DD_DZONE_AJAX_659' src='' height='0' width='0' scrolling='no' frameborder='0'></iframe></div><div class='dd_button'><div class='dd_delicious_normal_image dd_delicious'><a href='http://delicious.com/save' onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent('https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/')+'&amp;title='+encodeURIComponent('Managing Virtual Machines Efficiently in VirtualBox'),'delicious', 'toolbar=no,width=550,height=550'); return false;"><span id='DD_DELICIOUS_AJAX_659'></span></a></div></div></div><div style='clear:both'></div></div><div style='clear:both'></div><p>Testing your software on different system configurations and versions of operating systems is a good way to improve quality of your application. But how to do this in practice?</p>
<p>Installing multiple operating systems on your computer might solve the issue but you won&#8217;t like it. It will cut your hard drive into multiple partitions and eat free space from the partition used by your primary system. Also managing such setup is not easy. Each OS will update differently. You will need to install required applications as many times as many operating systems you will install.</p>
<p>In addition, this becomes more difficult if your software depends on another product. Which of course has also different versions and does not offer portable deployment. What than?</p>
<p>Fortunately, Virtual Machines has been invented. However, managing them in efficient way might be very tricky.</p>
<p><em>This article will describe my current setup of virtual machines in VirtualBox and best practices which I have came up with.</em></p>
<p>As a developer you will probably need to work sometimes with different systems to test something, debug something or check something. For this purposes, I recommend you to use VirtualBox. I won&#8217;t describe how to create your first Virtual Machine (VM) as I expect you are already familiar with it. This article is for those, who are now struggling with their VMs and ask how not to make mess of them.</p>
<p>In short:</p>
<ol>
<li>Learn how to use snapshots, use them a lot.</li>
<li>Think in advance (this article is good way to start).</li>
<li>Learn how to use clones.</li>
</ol>
<h2>Snapshots</h2>
<p>What are snapshots? Snapshot is a saved state of your virtual machine to which you can revert any time. It&#8217;s like restore points in Windows but on a very base level – on VM level. You can take snapshot from powered off system as well as from running or paused system. Basically, it will save current HDD state, RAM, processor state, etc. of your virtual machine. This can be very useful.</p>
<p>After snapshot is taken, any changes in VM are recorded as difference to last snapshot. The result is that no data are duplicated after taking a snapshot. This is an important feature to keep in mind.</p>
<p>Snapshots are composed into a tree. Each snapshots has parent snapshot set, except for the first snapshot which is the root of the tree. What it means? When you install/configure/do something in your Virtual Machine and take snapshot of that it will be present in all derived snapshots. That is another important feature worth mentioning.</p>
<p><b>Best practices for snapshots:</b></p>
<ul>
<li>Again, use snapshots a lot.</li>
<li>Prefer snapshots of powered off system to paused or running system. Even though it&#8217;s inconvenient to setup it will save you some hard drive space.</li>
<li>Fill in descriptive snapshot names and description. Really, do it. It&#8217;s important not to lost track of changes made by a snapshot.</li>
</ul>
<h2>Thinking in advance</h2>
<p>This is closely related with the previous section. Try to think of all supplementary software or configuration you will need in future while working with your virtual machine. If you install it in some base snapshot, you won&#8217;t need to install it multiple times again, which is both annoying, time consuming and space consuming.</p>
<p>By supplementary software, I mean all useful applications where you don&#8217;t need to track their version. It might be 7-zip, Java, PDF viewer, text editor, Total Commander, or even IDEs.</p>
<p>If you forgot to install into the common snapshot some software you will need, you have two options:</p>
<ol>
<li>Install it separately on all derived snapshots (which will make you swear).</li>
<li>Remove all derived snapshots and correct your base snapshot, than recover deleted snapshots by manually making changes again (will will make you swear even more, and maybe destroy things in reach).</li>
</ol>
<p>Therefore think twice before branching snapshots.</p>
<p><b>Best practices for thinking in advance</b>:</p>
<ol>
<li>Install all supplementary software at base snapshot.</li>
<li>Consider using <a href="http://ninite.com/">Ninite</a>. It will install most common applications for you, and you won&#8217;t need to go through every single installer. It will save you a lot of time.</li>
</ol>
<h2>Clones</h2>
<p>Cloning your virtual machine will result in a copy of selected virtual machine at current state or selected snapshot. There are two types of clones, primarily the latter is similar to snapshots:</p>
<ul>
<li>Full clone</li>
<li>Linked clone</li>
</ul>
<p><strong>Full Clone</strong> will copy all the virtual machine data and make a new machine based on this copy. Therefore full-cloning will take up as much space as the base virtual machine takes. All virtual machine files are duplicated.</p>
<p><strong>Linked Clone</strong> will create a new virtual machine, but virtual hard drive won&#8217;t be copied. Instead, a new hard drive will be made and will link to the base virtual machine hard drive in given snapshot. Linked clones are therefore space-efficient. It&#8217;s like making snapshots but with new virtual machine being created.</p>
<p><strong>Best practices for Clones:</strong><br />
Prefer linked clones to full clones (it will save you hard drive space).</p>
<ol>
<li>Understand differences between clone types</li>
<li>Prefer linked clones to full clones (it will save you HDD space).</li>
</ol>
<h2>Example</h2>
<p>Putting all the advice together, I will show you an example how to manage virtual machines:</p>
<p>In this example, let&#8217;s assume we need to test an Office Add-In which would be compatible with all versions since Office 2003. That counts 6 versions (2003, 2007, 2010 32-bit, 2010 64-bit, 2013 32-bit and 2013 64-bit). We do not have any VMs installed yet.</p>
<p><b>Creating base virtual machine</b></p>
<ol>
<li>Create new virtual machine called “Windows XP Sandbox”.</li>
<li>Install operating system to the machine.</li>
<li>Log in for the first time and do not install any updates.</li>
<li>Activate operating system.</li>
<li>Configure UAC (turn off most probably).</li>
<li>Configure desktop icons.</li>
<li>Configure task bar (you might want to turn on Quick Launch).</li>
<li>Configure your mouse and keyboard (you might want to turn off mouse acceleration).</li>
<li>I recommend you to turn off system restore at this point.</li>
<li>Turn on Shared Clipboard and Bidirectional Drag&#8217;n'Drop. Even though Guest Additions are required for this features to work, the configuration will be stored in snapshot and you won&#8217;t have to think about enabling this features later.</li>
<li>Also configure Shared folders ASAP.</li>
<li>Clean up hard drive from temporary files.</li>
<li>Unmount all mounted CD/DVD images.</li>
<li>Turn off the machine and take first snapshot of the machine called “Raw Install”.</li>
<li>Run machine and install the VirtualBox Guest Additions. Still do not install any updates. Restart and adjust resolution, than turn off VM.</li>
<li>Clean up hard drive from temporary files.</li>
<li>You might want to place shortcuts to shared folders to your desktop.</li>
<li>Unmount all mounted CD/DVD images.</li>
<li>Take second snapshot called “with Guest Additions”.</li>
<li>Run machine, install all available system updates and clean up hard drive.</li>
<li>I also recommend turning automatic updates off. Otherwise they will be bugging you every time you start VM after some time it has been inactive.</li>
<li>Unmount all mounted CD/DVD images.</li>
<li>Turn VM off and take third snapshot called “Updated Install”.</li>
<li>Run machine, install supplementary software (eg. using <a href="http://ninite.com/">Ninite</a>), clean up hard drive and turn off.</li>
<li>Take fourth snapshot called “with Apps”. I recommend to include installed apps into snapshot’s description.</li>
</ol>
<p>This machine represents “virgin” installation of operating system with supplementary software. You might reuse it any time later. I think you have the idea.</p>
<p><strong>Installing Office VMs</strong></p>
<p>For each Office version:</p>
<ol>
<li>Create linked clone of the base virtual machine created in previous section and name it “Windows XP Office [version]”.</li>
<li>Run machine and install given Office version and turn off.</li>
<li>Finally, take snapshot called “with Office [version]”.</li>
</ol>
<h2>Conclusion</h2>
<p>I hope you found this article helpful and you got the idea. Management of your virtual machines should be now easier and less frustrating.</p>
<p>Some final notes:</p>
<ul>
<li>Yes, you will need one base virtual machine for each OS you want to play with.</li>
<li>I’m not sure if installation of your IDE should be included in base snapshots or not. IDE is space consuming and you won’t need it in most of the cases.</li>
<li>If you use shared folders, share them in base snapshots as this information is also stored in snapshots.</li>
</ul>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href="http://www.dextronet.com/micro-isv-insights/are-you-a-zen-coder-or-distraction-junkie/" title="Are you a Zen Coder or Distraction-Junkie?">Are you a Zen Coder or Distraction-Junkie?</a></li>
<li><a href="http://www.dextronet.com/micro-isv-insights/30-books-everyone-in-software-business-should-read-and-why/" title="30 books everyone in software business should read (and why)">30 books everyone in software business should read (and why)</a></li>
<li><a href="http://www.dextronet.com/micro-isv-insights/interview-with-embacardo-about-delphi-firemonkey-and-misv-business/" title="Interview with Embarcadero about FireMonkey, mISV business and Delphi">Interview with Embarcadero about FireMonkey, mISV business and Delphi</a></li>
</ul>
<script type="text/javascript"> jQuery(document).ready(function($) { window.setTimeout('loadGoogle1_659()',1000);window.setTimeout('loadTwitter_659()',1000);window.setTimeout('loadLinkedin_659()',1000);window.setTimeout('loadDzone_659()',1000);window.setTimeout('loadDelicious_659()',1000); }); </script><script type="text/javascript"> function loadGoogle1_659(){ jQuery(document).ready(function($) { $('.dd-google1-659').remove();$.getScript('https://apis.google.com/js/plusone.js'); }); } function loadTwitter_659(){ jQuery(document).ready(function($) { $('.dd-twitter-659').remove();$.getScript('http://platform.twitter.com/widgets.js'); }); } function loadLinkedin_659(){ jQuery(document).ready(function($) { $('.dd-linkedin-659').remove();$.getScript('http://platform.linkedin.com/in.js'); }); } function loadDzone_659(){ jQuery(document).ready(function($) { $('.dd-dzone-659').remove();$('.DD_DZONE_AJAX_659').attr('width','50');$('.DD_DZONE_AJAX_659').attr('height','70');$('.DD_DZONE_AJAX_659').attr('src','http://widgets.dzone.com/links/widgets/zoneit.html?url=https%3A%2F%2Fwww.dextronet.com%2Fmicro-isv-insights%2Fmanaging-virtual-machines-efficiently-in-virtualbox%2F&title=Managing%20Virtual%20Machines%20Efficiently%20in%20VirtualBox&t=1'); }); } function loadDelicious_659(){ jQuery(document).ready(function($) { $('.dd-delicious-659').remove();$.getJSON('http://feeds.delicious.com/v2/json/urlinfo/data?url=https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/&amp;callback=?',function(data) {var msg ='';var count = 0;if (data.length > 0) {count = data[0].total_posts;if(count ==0){msg = '0';}else if(count ==1){msg = '1';}else{msg = count}}else{msg = '0';}$('#DD_DELICIOUS_AJAX_659').text(msg);}); }); }</script><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com --><p><a href="https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/">Managing Virtual Machines Efficiently in VirtualBox</a> is a post from: <a href="https://www.dextronet.com/micro-isv-insights">Micro-ISV Insights Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.dextronet.com/micro-isv-insights/managing-virtual-machines-efficiently-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
