{"id":368,"date":"2010-01-03T03:46:17","date_gmt":"2010-01-03T08:46:17","guid":{"rendered":"http:\/\/192.168.33.66\/wp\/?p=368"},"modified":"2010-02-13T13:32:34","modified_gmt":"2010-02-13T18:32:34","slug":"how-do-i-shrink-the-size-of-a-vhd-when-i-know-its-inflated-unnecessarily","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=368","title":{"rendered":"How do I shrink the size of a .VHD when I know it&#8217;s inflated unnecessarily?&#8221;"},"content":{"rendered":"<p><a href=\"http:\/\/kurtsh.spaces.live.com\/blog\/cns!DA410C7F7E038D!1902.entry?sa=933792380\" target=\"_blank\">Normally, people don&#8217;t<\/a> care about file size bloat that much however when you&#8217;re using Virtual PC .VHDs you may be talking about 3-4GB of wasted storage or more.\u00a0 So the question is, &#8220;<span style=\"text-decoration: underline;\">How do I shrink the size of a .VHD when I know it&#8217;s inflated unnecessarily<\/span>?&#8221;<!--more--><\/p>\n<p>Here&#8217;s how to do it:<\/p>\n<ol>\n<li><strong>Clear out the machine of filler<\/strong><br \/>\nI recommend installing CCLEANER.EXE from <a href=\"http:\/\/ccleaner.com\/\">http:\/\/ccleaner.com<\/a> which deletes all temporary files from the Windows installation, Internet Explorer cache, the Recycle Bin, and any number of other &#8220;garbage&#8221;\/&#8221;temp&#8221; directories in the VPC.<\/li>\n<li><strong>Disable hibernation<br \/>\n<\/strong>If you have hiberation turned on, there&#8217;s a colossal sized file called hiberfil.sys in the root of the .VHD. \u00a0Go into Power options in Control Panel and disable hiberation to get rid of this file.<\/li>\n<li><strong>Capture the Virtual Disk Precompactor .ISO<br \/>\n<\/strong>In the menu of Virtual PC windows for your machine, capture the Virtual Disk Precompactor .ISO file which is located at:<br \/>\n<span style=\"font-family: Courier New; font-size: xx-small;\">c:\\program files\\microsoft virtual pc\\virtual machine additions\\virtual disk precompactor.iso<\/span><\/li>\n<li><strong>Run the Precompactor<br \/>\n<\/strong>Go to My Computer and double click on the mounted disk.\u00a0 It will begin to run the precompactor software which will essentially zero out all the free space on the disk, making it available for elimination from the file by the Virtual Disk Wizard, which we will use later.\u00a0 This process may take upwards of\u00a015 minutes<\/li>\n<li><strong>Shutdown the Virtual PC<\/strong><\/li>\n<li><strong>Run the VPC2007 Virtual Disk Wizard<br \/>\n<\/strong>From the Virtual PC console, click File-Virtual Disk Wizard and &#8220;Edit an existing virtual disk&#8221;.\u00a0 It will ask you to identify the .VHD file to reduce in size &#8211; select it.<\/li>\n<li><strong>Compact the .VHD<\/strong><br \/>\nSelect the\u00a0&#8220;Compact&#8221; option then select &#8220;Replacing the original file&#8221;.\u00a0 This will take a few minutes.<\/li>\n<\/ol>\n<p>When this process finishes, you should have a .VHD file with a much smaller size.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normally, people don&#8217;t care about file size bloat that much however when you&#8217;re using Virtual PC .VHDs you may be talking about 3-4GB of wasted storage or more.\u00a0 So the question is, &#8220;How do I shrink the size of a &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=368\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-368","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=368"}],"version-history":[{"count":4,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":370,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/368\/revisions\/370"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}