On Wed, Jun 22, 2016 at 12:40:40AM -0500, libvirt_users(a)skagitattic.com wrote:
So you are saying when I do the virt-sparsify its converting the
image
from raw to [qcow2]?
No. virt-sparsify will use the same input and output formats, unless
you use the --convert option.
I studied the man page for virt-sparsify and tried again with
the flag "--format raw" (output2.cow2). This output files looks as I
first expected.
# ls -lrh
total 4.7G
-rw-r--r-- 1 root root 790M Jun 14 22:36 output.qcow2
-rw-r--r-- 1 root root 51G Jun 21 18:34 output2.qcow2
-rw-r--r-- 1 root root 51G Jun 14 22:30 input.qcow2
-rw-r--r-- 1 root root 512M Jun 14 22:30 file.img
# du -sh *
0 file.img
2.4G input.qcow2
1.6G output2.qcow2
790M output.qcow2
So I guess it was detecting the source wrong and doing a conversion?
(As it says "If this is not specified, then the input format is used."
in the man page)
Also seems odd that it is 1.6G rather then the 790M of the output in
qcow2 format. Does qcow2 do some compression or something?
I'm really confused about what you actually are doing.
Delete what you've done and start from the beginning. Describe
exactly how you created the guest. Use 'qemu-img info' to show the
format of the input file. Show precisely the virt-sparsify command
you are running. And use 'qemu-img info' on the output file too.
Is there any reason to use raw vs non-raw? From some reading online
it
appears performance is better with raw files. Is there a downside to
using raw?
Raw has fewer features, especially no simple snapshotting or support
for backing files.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html