From ae6b0ed6d4d4a41e77584f44d2888303645fa845 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Sat, 24 Apr 2010 09:12:12 +0100 Subject: qemu-img: Add 'resize' command to grow/shrink disk images This patch adds a 'resize' command to grow/shrink disk images. This allows changing the size of disk images without copying to a new image file. Currently only raw files support resize. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- qemu-img.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qemu-img.texi') diff --git a/qemu-img.texi b/qemu-img.texi index ac97854..c1b1f27 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -106,6 +106,18 @@ they are displayed too. @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename} List, apply, create or delete snapshots in image @var{filename}. + +@item resize @var{filename} [+ | -]@var{size} + +Change the disk image as if it had been created with @var{size}. + +Before using this command to shrink a disk image, you MUST use file system and +partitioning tools inside the VM to reduce allocated file systems and partition +sizes accordingly. Failure to do so will result in data loss! + +After using this command to grow a disk image, you must use file system and +partitioning tools inside the VM to actually begin using the new space on the +device. @end table Supported image file formats: -- cgit v1.1