diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-08-18 22:27:17 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-19 15:35:14 +0100 |
commit | cd1627e8041ffa06764ef82b984f4291660edcc9 (patch) | |
tree | feec53743f66f951a1ccf28be46c543514e31c6a /examples | |
parent | d67e6ea75dde6309ce4c6162a4a0429ab8d6709b (diff) | |
download | libguestfs-cd1627e8041ffa06764ef82b984f4291660edcc9.tar.gz libguestfs-cd1627e8041ffa06764ef82b984f4291660edcc9.tar.xz libguestfs-cd1627e8041ffa06764ef82b984f4291660edcc9.zip |
FAQ: virt-sparsify and raw sparse output.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/guestfs-faq.pod | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/guestfs-faq.pod b/examples/guestfs-faq.pod index 7ca534ab..28257437 100644 --- a/examples/guestfs-faq.pod +++ b/examples/guestfs-faq.pod @@ -405,6 +405,25 @@ C<$TMPDIR/.guestfs-E<lt>UIDE<gt>> is used instead. It is safe to delete this directory when you are not using libguestfs. +=head2 virt-sparsify seems to make the image grow to the +full size of the virtual disk + +If the input to L<virt-sparsify(1)> is raw, then the output will be +raw sparse. Make sure you are measuring the output with a tool which +understands sparseness such as C<du-sh>. It can make a huge difference: + + $ ls -lh test1.img + -rw-rw-r--. 1 rjones rjones 100M Aug 8 08:08 test1.img + $ du -sh test1.img + 3.6M test1.img + +(Compare the apparent size B<100M> vs the actual size B<3.6M>) + +If all this confuses you, use a non-sparse output by specifying the +I<--convert> option, eg: + + virt-sparsify --convert qcow2 disk.raw disk.qcow2 + =head1 USING LIBGUESTFS IN YOUR OWN PROGRAMS =head2 The API has hundreds of methods, where do I start? |