summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-05-25 11:45:23 +0100
committerRichard Jones <rjones@redhat.com>2010-05-25 11:45:23 +0100
commit0e28e4104d96bf0bf5b88fb07bb7e5f9f6e6f41f (patch)
treeeceb1e10b90a4caa500b0943f48f38ace9e11652
parent57cc217335ff511e579b094e47b0de57d5c3aaef (diff)
downloadlibguestfs-0e28e4104d96bf0bf5b88fb07bb7e5f9f6e6f41f.tar.gz
libguestfs-0e28e4104d96bf0bf5b88fb07bb7e5f9f6e6f41f.tar.xz
libguestfs-0e28e4104d96bf0bf5b88fb07bb7e5f9f6e6f41f.zip
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.
-rwxr-xr-xtools/virt-resize17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/virt-resize b/tools/virt-resize
index b3185d3e..a70492e8 100755
--- a/tools/virt-resize
+++ b/tools/virt-resize
@@ -61,7 +61,22 @@ L<virt-list-filesystems(1)> and
L<virt-df(1)>,
we recommend you go and read those manual pages first.
-=head1 BASIC USAGE
+=head1 EXAMPLES
+
+Copy C<olddisk> to C<newdisk>, 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