<?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>Solutions Log &#187; compact</title>
	<atom:link href="http://solutions.unixsherpa.com/tag/compact/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.unixsherpa.com</link>
	<description>by Dan Reiland</description>
	<lastBuildDate>Fri, 16 Apr 2010 20:28:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Shrink VirtualBox vdisks After Freeing Space (Windows guests)</title>
		<link>http://solutions.unixsherpa.com/2009/08/13/shrink-virtualbox-vdisks-after-freeing-space-windows-guests/</link>
		<comments>http://solutions.unixsherpa.com/2009/08/13/shrink-virtualbox-vdisks-after-freeing-space-windows-guests/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 19:35:47 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[compact]]></category>

		<guid isPermaLink="false">http://solutions.unixsherpa.com/?p=164</guid>
		<description><![CDATA[Issue: On dynamically allocated vdisks, freed space on a guest is never released back to the host once freed. Cause: This is by design. Resolution: The procedure for shrinking (compacting in VirtualBox parlance) is straightforward and consists of a series of steps. Delete files on the guest to achieve the desired amount of free space [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue:</strong><br />
On dynamically allocated vdisks, freed space on a guest is never released back to the host once freed.</p>
<p><strong>Cause:</strong><br />
This is by design.</p>
<p><strong>Resolution:</strong><br />
The procedure for shrinking (compacting in VirtualBox parlance) is straightforward and consists of a series of steps.</p>
<ol>
<li>Delete files on the guest to achieve the desired amount of free space</li>
<li>Zero free space out with an appropriate utility</li>
<li>Shut down guest</li>
<li>Compact disk</li>
</ol>
<p>Zeroing guest free space is simple: <a href="http://www.microsoft.com">Microsoft</a> provides an excellent utility through its <a href="http://technet.microsoft.com/en-us/sysinternals/default.aspx">Sysinternals</a> group called <a href="http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx">SDelete</a>. Download the program, extract it from the archive, and execute it on the disk to be zeroed. <em>Note: this procedure only zeroes <strong>free</strong> space.</em></p>
<div class="codecolorer-container dos twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sdelete -c</div></div>
<p>One the zeroing procedure is completed, you may power off the guest and compact the virtual disk from the command line.</p>
<div class="codecolorer-container dos twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">VBoxManage modifyvdi /path/to/machine.vdi compact</div></div>
<p><em>Note: This was tested against VirtualBox 3.0.4 r50677</em></p>
<p>References:<br />
<a href="http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx">SDelete</a></p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.unixsherpa.com/2009/08/13/shrink-virtualbox-vdisks-after-freeing-space-windows-guests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
