qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] resize an image


From: Paul Brook
Subject: Re: [Qemu-devel] resize an image
Date: Fri, 12 Aug 2005 17:15:16 +0100
User-agent: KMail/1.7.2

On Friday 12 August 2005 16:35, Jim C. Brown wrote:
> On Fri, Aug 12, 2005 at 08:56:24AM +0200, address@hidden wrote:
> > Hello,
> >
> > I did create some time ago an 2GB image via dd. Now I have to realize
> > that I on ly ndeed 1,1 GB is there a way to shrink the sizes of my
> > image?
> >
> > Thanks a lot
> > Michael
>
> This is unusual. Most people ask if they can enlarge them.
>
> The easy way, if you are using raw format, is just to use dd to make the
> smaller sized file and then fix the partition table. A defrag might be
> helpful.

Probably a good idea to shrink the partition _before_ you shrink the image and 
discard all the data in that half of the disk :-)

> The hard way is to make a new blank disk image of the right size, and then
> to create the partition table and file systems in the new disk image, and
> then copy everything over.

I'd argue this is actually the easy way.  It's certainly much safer than 
trying to resize partitions in place. You can pass both images to qemu (using 
-hdb), use conventional migration tools within the guest, then just switch 
the images.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]