From: Richard Jones Date: Tue, 25 May 2010 10:45:23 +0000 (+0100) Subject: resize: Refresh the examples in the documentation. X-Git-Tag: 1.3.15~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=0e28e4104d96bf0bf5b88fb07bb7e5f9f6e6f41f;p=libguestfs.git resize: Refresh the examples in the documentation. The documentation was previously very intimidating. Bring some common, simple examples up to the top of the page in a separate section. --- diff --git a/tools/virt-resize b/tools/virt-resize index b3185d3..a70492e 100755 --- a/tools/virt-resize +++ b/tools/virt-resize @@ -61,7 +61,22 @@ L and L, we recommend you go and read those manual pages first. -=head1 BASIC USAGE +=head1 EXAMPLES + +Copy C to C, extending one of the guest's partitions +to fill the extra 5GB of space. + + truncate -r olddisk newdisk; truncate -s +5G newdisk + virt-list-partitions -lht olddisk + # Note "/dev/sda2" is a partition inside the "olddisk" file. + virt-resize --expand /dev/sda2 olddisk newdisk + +As above, but make the /boot partition 200MB bigger, while giving the +remaining space to /dev/sda2: + + virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk + +=head1 DETAILED USAGE =head2 EXPANDING A VIRTUAL MACHINE DISK