summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-10-21 22:48:10 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-22 07:29:39 +0100
commite192035bbd6f80262f60565e0a91588848f2a4e3 (patch)
tree42730b78601c685efce2f0819daf34efa6c06d90 /tools
parentc214cdc54e955ff1a01c00b99b0d6bd20e8b6bcd (diff)
downloadlibguestfs-e192035bbd6f80262f60565e0a91588848f2a4e3.tar.gz
libguestfs-e192035bbd6f80262f60565e0a91588848f2a4e3.tar.xz
libguestfs-e192035bbd6f80262f60565e0a91588848f2a4e3.zip
virt-make-fs: Refresh man page.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/virt-make-fs74
1 files changed, 38 insertions, 36 deletions
diff --git a/tools/virt-make-fs b/tools/virt-make-fs
index 28b4abad..d97d2629 100755
--- a/tools/virt-make-fs
+++ b/tools/virt-make-fs
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
# virt-make-fs
-# Copyright (C) 2010 Red Hat Inc.
+# Copyright (C) 2010-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,39 +56,13 @@ data to a VM).
Basic usage is:
- virt-make-fs input output
+ virt-make-fs input output.img
where C<input> is either a directory containing files that you want to
add, or a tar archive (either uncompressed tar or gzip-compressed
-tar); and C<output> is a disk image. The input type is detected
-automatically. The output disk image defaults to a raw ext2 image
-unless you specify extra flags (see L</OPTIONS> below).
-
-=head2 EXTRA SPACE
-
-Unlike formats such as tar and squashfs, a filesystem does not "just
-fit" the files that it contains, but might have extra space.
-Depending on how you are going to use the output, you might think this
-extra space is wasted and want to minimize it, or you might want to
-leave space so that more files can be added later. Virt-make-fs
-defaults to minimizing the extra space, but you can use the I<--size>
-flag to leave space in the filesystem if you want it.
-
-An alternative way to leave extra space but not make the output image
-any bigger is to use an alternative disk image format (instead of the
-default "raw" format). Using I<--format=qcow2> will use the native
-QEmu/KVM qcow2 image format (check your hypervisor supports this
-before using it). This allows you to choose a large I<--size> but the
-extra space won't actually be allocated in the image until you try to
-store something in it.
-
-Don't forget that you can also use local commands including
-L<resize2fs(8)> and L<virt-resize(1)> to resize existing filesystems,
-or rerun virt-make-fs to build another image from scratch.
-
-=head3 EXAMPLE
-
- virt-make-fs --format=qcow2 --size=+200M input output.img
+tar); and C<output.img> is a disk image. The input type is detected
+automatically. The output disk image defaults to a raw ext2 sparse
+image unless you specify extra flags (see L</OPTIONS> below).
=head2 FILESYSTEM TYPE
@@ -150,6 +124,32 @@ better to use an EFI/GPT-compatible partition table:
virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img
+=head2 EXTRA SPACE
+
+Unlike formats such as tar and squashfs, a filesystem does not "just
+fit" the files that it contains, but might have extra space.
+Depending on how you are going to use the output, you might think this
+extra space is wasted and want to minimize it, or you might want to
+leave space so that more files can be added later. Virt-make-fs
+defaults to minimizing the extra space, but you can use the I<--size>
+flag to leave space in the filesystem if you want it.
+
+An alternative way to leave extra space but not make the output image
+any bigger is to use an alternative disk image format (instead of the
+default "raw" format). Using I<--format=qcow2> will use the native
+QEmu/KVM qcow2 image format (check your hypervisor supports this
+before using it). This allows you to choose a large I<--size> but the
+extra space won't actually be allocated in the image until you try to
+store something in it.
+
+Don't forget that you can also use local commands including
+L<resize2fs(8)> and L<virt-resize(1)> to resize existing filesystems,
+or rerun virt-make-fs to build another image from scratch.
+
+=head3 EXAMPLE
+
+ virt-make-fs --format=qcow2 --size=+200M input output.img
+
=head1 OPTIONS
=over 4
@@ -222,7 +222,7 @@ my $format = "raw";
Choose the output disk image format.
-The default is C<raw> (raw disk image).
+The default is C<raw> (raw sparse disk image).
For other choices, see the L<qemu-img(1)> manpage. The only other
choice that would really make sense here is C<qcow2>.
@@ -260,13 +260,15 @@ Note that if you just use a lonesome I<--partition>, the Perl option
parser might consider the next parameter to be the partition type.
For example:
- virt-make-fs --partition input.tar ...
+ virt-make-fs --partition input.tar output.img
would cause virt-make-fs to think you wanted to use a partition type
of C<input.tar> which is completely wrong. To avoid this, use I<-->
-(a double dash) between options and the input file argument:
+(a double dash) between options and the input and output arguments:
+
+ virt-make-fs --partition -- input.tar output.img
- virt-make-fs --partition -- input.tar ...
+For MBR, virt-make-fs sets the partition type byte automatically.
=back
@@ -583,7 +585,7 @@ Richard W.M. Jones L<http://people.redhat.com/~rjones/>
=head1 COPYRIGHT
-Copyright (C) 2010 Red Hat Inc.
+Copyright (C) 2010-2011 Red Hat Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by