<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Compacting Microsoft Virtual PC VHD Images 101</title>
	<atom:link href="http://www.bohack.com/2009/05/compacting-microsoft-virtual-pc-vhd-images-101/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bohack.com/2009/05/compacting-microsoft-virtual-pc-vhd-images-101/</link>
	<description>Check In and Tune Out!</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:52:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Sean Kynaston</title>
		<link>http://www.bohack.com/2009/05/compacting-microsoft-virtual-pc-vhd-images-101/comment-page-1/#comment-202</link>
		<dc:creator>Sean Kynaston</dc:creator>
		<pubDate>Sat, 13 Mar 2010 02:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.bohack.com/?p=258#comment-202</guid>
		<description>Awesome post. I don&#039;t suppose you&#039;d be against it if I added your blog to my link exchange directory?</description>
		<content:encoded><![CDATA[<p>Awesome post. I don&#8217;t suppose you&#8217;d be against it if I added your blog to my link exchange directory?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bohack</title>
		<link>http://www.bohack.com/2009/05/compacting-microsoft-virtual-pc-vhd-images-101/comment-page-1/#comment-124</link>
		<dc:creator>Bohack</dc:creator>
		<pubDate>Wed, 25 Nov 2009 14:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bohack.com/?p=258#comment-124</guid>
		<description>You are right in Windows 7 you can now mount the VHD and run utilities on it like defrag. Although I haven&#039;t tried it yet, I&#039;ve done this same procedure with VMware; they have a disk mount utility similar to the diskpart utility. If you have the VHD engaged in a operating system that it belongs to (i.e. you&#039;ve booted the VMC file with the VHD attached and you are trying to defrag a live system. It will not work, you cannot defrag a host operating system. The defrag process needs full access to the entire disk, that means no files (like pagefile) can be opened and used. I will be loading Windows 7 and trying the new tools, I will probably follow up with a new post.</description>
		<content:encoded><![CDATA[<p>You are right in Windows 7 you can now mount the VHD and run utilities on it like defrag. Although I haven&#8217;t tried it yet, I&#8217;ve done this same procedure with VMware; they have a disk mount utility similar to the diskpart utility. If you have the VHD engaged in a operating system that it belongs to (i.e. you&#8217;ve booted the VMC file with the VHD attached and you are trying to defrag a live system. It will not work, you cannot defrag a host operating system. The defrag process needs full access to the entire disk, that means no files (like pagefile) can be opened and used. I will be loading Windows 7 and trying the new tools, I will probably follow up with a new post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.bohack.com/2009/05/compacting-microsoft-virtual-pc-vhd-images-101/comment-page-1/#comment-123</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 25 Nov 2009 14:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bohack.com/?p=258#comment-123</guid>
		<description>Is there a good reason not to run the defrag on the vhd from your OS (rather then the copy of the VM)?  Using Windows 7 disk management interface  (or using diskpart.exe), you can mount vhd files as a seperate volume.</description>
		<content:encoded><![CDATA[<p>Is there a good reason not to run the defrag on the vhd from your OS (rather then the copy of the VM)?  Using Windows 7 disk management interface  (or using diskpart.exe), you can mount vhd files as a seperate volume.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Straw</title>
		<link>http://www.bohack.com/2009/05/compacting-microsoft-virtual-pc-vhd-images-101/comment-page-1/#comment-120</link>
		<dc:creator>Sean Straw</dc:creator>
		<pubDate>Wed, 14 Oct 2009 06:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bohack.com/?p=258#comment-120</guid>
		<description>FTR, you don&#039;t need to hassle with fetching and familiarizing yourself with BartPE for step 2 -- simply make a copy of the original XP virtual system (including the drive), then configure it to mount the as a SECOND DRIVE the VHD from the base system you&#039;re compacting.  Then you can run utilities from within a non- &quot;ram resident&quot; copy of Windows on it.  May require a bit more disk initially, but once you&#039;ve performed the file deletions, defragged and precompacted, you can delete the second copy, thus freeing up the space which will be necessary for the actual compaction step.

Note also that when you capture the precompaction iso, you should ABORT the precompact, then manually launch the program with options, so that the OS drive isn&#039;t compacted:

  h:\precompact -SetDisks:d

if your cd is h: and the second drive is mounted as d

(&quot;precompact /?&quot; will provide commandline args)

This spares you the overhead of compacting ALL drives, which precompact would otherwise do by default.

Note that you should avoid running with undo for the compaction process - when you shut down, you still have to apply the changes.

BTW, I use a portable-ized Virtual PC config, which I&#039;ve stripped out the codepage directories (the numbered dirs, except 1033 which is US English), the non-english documentation, edited the two ISO images to remove the 2MB spacer file (the Windows emulated CD driver doesn&#039;t have a minimum size requirement), about 18.9MB of alternate language MSIs from the VMAdditions.ISO, as well as the 2.9MB OS/2 installer (I&#039;m not about to use it...), which in sum total removes a bit over 25MB of cruft from the Virtual PC host environment - the zip file with the portable content is all of 11MB in size, which of course pales in comparison to the VHD files I carry with it, but still, it&#039;s barely a third the size of the MS installer for Virtual PC.  The portable-ized edition makes it easy to copy from USB to a machine in the field from when you need to access an alternate OS environment.  On top of all that, I&#039;ve added Dave Whitney&#039;s defrag to the precompact ISO image, so it&#039;s right there when I mount that ISO, and the autorun file can be eliminated so precompact isn&#039;t launched automatically.


To save your readers the hassle of discovering it for themselves, if you attempt to defrag a difference-based VHD, it will essentially merge the parent image into the difference one.  However, when you go to run the wizard to get to compacting it, it&#039;ll end up prompting you to merge with the parent then (at it would if you attempted to run the wizard on an un-defrag&#039;ed VHD).  In my experience, you cannot reclaim the space lost to the pagefile and temporary content, etc in a difference VHD.

Oh, insert step 3.5 -- EMPTY THE RECYCLE BIN, just in case pagefile.sys and hiberfil.sys are being retained there.  Until emptied, they&#039;re not gone from the file system.</description>
		<content:encoded><![CDATA[<p>FTR, you don&#8217;t need to hassle with fetching and familiarizing yourself with BartPE for step 2 &#8212; simply make a copy of the original XP virtual system (including the drive), then configure it to mount the as a SECOND DRIVE the VHD from the base system you&#8217;re compacting.  Then you can run utilities from within a non- &#8220;ram resident&#8221; copy of Windows on it.  May require a bit more disk initially, but once you&#8217;ve performed the file deletions, defragged and precompacted, you can delete the second copy, thus freeing up the space which will be necessary for the actual compaction step.</p>
<p>Note also that when you capture the precompaction iso, you should ABORT the precompact, then manually launch the program with options, so that the OS drive isn&#8217;t compacted:</p>
<p>  h:\precompact -SetDisks:d</p>
<p>if your cd is h: and the second drive is mounted as d</p>
<p>(&#8220;precompact /?&#8221; will provide commandline args)</p>
<p>This spares you the overhead of compacting ALL drives, which precompact would otherwise do by default.</p>
<p>Note that you should avoid running with undo for the compaction process &#8211; when you shut down, you still have to apply the changes.</p>
<p>BTW, I use a portable-ized Virtual PC config, which I&#8217;ve stripped out the codepage directories (the numbered dirs, except 1033 which is US English), the non-english documentation, edited the two ISO images to remove the 2MB spacer file (the Windows emulated CD driver doesn&#8217;t have a minimum size requirement), about 18.9MB of alternate language MSIs from the VMAdditions.ISO, as well as the 2.9MB OS/2 installer (I&#8217;m not about to use it&#8230;), which in sum total removes a bit over 25MB of cruft from the Virtual PC host environment &#8211; the zip file with the portable content is all of 11MB in size, which of course pales in comparison to the VHD files I carry with it, but still, it&#8217;s barely a third the size of the MS installer for Virtual PC.  The portable-ized edition makes it easy to copy from USB to a machine in the field from when you need to access an alternate OS environment.  On top of all that, I&#8217;ve added Dave Whitney&#8217;s defrag to the precompact ISO image, so it&#8217;s right there when I mount that ISO, and the autorun file can be eliminated so precompact isn&#8217;t launched automatically.</p>
<p>To save your readers the hassle of discovering it for themselves, if you attempt to defrag a difference-based VHD, it will essentially merge the parent image into the difference one.  However, when you go to run the wizard to get to compacting it, it&#8217;ll end up prompting you to merge with the parent then (at it would if you attempted to run the wizard on an un-defrag&#8217;ed VHD).  In my experience, you cannot reclaim the space lost to the pagefile and temporary content, etc in a difference VHD.</p>
<p>Oh, insert step 3.5 &#8212; EMPTY THE RECYCLE BIN, just in case pagefile.sys and hiberfil.sys are being retained there.  Until emptied, they&#8217;re not gone from the file system.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

