From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CzdRG-0003jJ-OI for qemu-devel@nongnu.org; Fri, 11 Feb 2005 11:14:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CzdRE-0003i6-2X for qemu-devel@nongnu.org; Fri, 11 Feb 2005 11:14:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzdRD-0003gg-Re for qemu-devel@nongnu.org; Fri, 11 Feb 2005 11:14:35 -0500 Received: from [64.233.184.195] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CzdCc-0000U0-8f for qemu-devel@nongnu.org; Fri, 11 Feb 2005 10:59:30 -0500 Received: by wproxy.gmail.com with SMTP id 68so1481658wra for ; Fri, 11 Feb 2005 07:59:29 -0800 (PST) Message-ID: Date: Fri, 11 Feb 2005 10:59:29 -0500 From: Joe Bogner Subject: Re: [Qemu-devel] image size - OS reports 720mb, but image file is 2.3 gig In-Reply-To: <200502111503.05111.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200502111503.05111.paul@codesourcery.com> Reply-To: Joe Bogner , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org WipeDisk did the trick on Windows. My physical disk image is now the same size as what the guest OS reports. WipeDisk - http://www.birdcomputer.ca/Software/SoftwareToC.html Thanks for your help. On Fri, 11 Feb 2005 15:03:04 +0000, Paul Brook wrote: > On Friday 11 February 2005 14:18, Joe Bogner wrote: > > Hello, > > > > I'm trying to create an win2k image that is as small as possible. I'd > > like to be able to copy the image back and forth between machines so > > that I have a complete win2k development image. > > > > According to win2k, the size is about 720mb. Originally win2k was > > reporting the size to be about 1.2gig, but I was able to reduce it > > through NTFS compression. > > > > Here's the dilemna. The physical image file is 2.3gig. I've run a > > qemu-img convert -f qcow -O qcow , which took the > > original 4.5 gig image down to 2.3 gig. With qemu-img compression, I > > was able to get it down to 1.7gig. > > > > Why is there such a large discrepency between what win2k reports and > > the physical image file on disk? Is there anything else I can do to > > reduce it, aside from compressing the physical image file? > > > > 1.7 gig is still quite a bit to be shuffling around between machines. > > Even if files have been deleted/compressed the data will still be there on the > disk. qemu can't tell the difference between "useful" data, and unused data > that can be discarded. You need to make sure all the unused space on the > image is actually zeroed. > > One way to achieve this would be to shrink the guest partition to its minimum > size, then create a second partition on the unused space and explicitly zero > that out (using dd from knoppix if necessary). > > Paul >