Red Hat Bugzilla – Bug 783184
storage cloning ignores "sparse" and creates non-sparse disk images
Last modified: 2012-08-16 01:39:24 EDT
Description of problem: virt-clone ignores "sparse" and creates non-sparse disk images Version-Release number of selected component (if applicable): python-virtinst-0.600.0-5.el6.noarch How reproducible: 100% Steps to Reproduce: 1. clone sparse VM 2. run stat and compare blocks allocated Actual results: cloned image is non sparse - the amount of blocks is several times bigger than original. Expected results: cloned image is sparse Additional info: I have not done any investigation on older versions.
Please provide output of virt-clone --debug when reproducing
Created attachment 559242 [details] virt-clone log with --debug
This is a libvirt bug, patch forthcoming.
Upstream now: http://libvirt.org/git/?p=libvirt.git;a=commit;h=0ed86cfb514fea6d6c6182fec86a632ff0fa3062
verify with: libvirt-0.9.10-1.el6.x86_64 python-virtinst-0.600.0-7.el6.noarch step same with comment 3 before clone: # du v1.img 2871456 v1.img # stat v1.img File: `v1.img' Size: 6291456000 Blocks: 5742912 IO Block: 4096 regular file Device: 805h/2053d Inode: 2885429 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2012-02-14 04:50:59.918362545 -0500 Modify: 2012-02-14 04:50:04.372426169 -0500 Change: 2012-02-14 04:50:30.955113070 -0500 after clone: # du v1-clone.img 749936 v1-clone.img # stat v1-clone.img File: `v1-clone.img' Size: 6291456000 Blocks: 1499872 IO Block: 4096 regular file Device: 805h/2053d Inode: 2885438 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 107/ qemu) Gid: ( 107/ qemu) Access: 2012-02-14 04:53:43.038592256 -0500 Modify: 2012-02-14 04:57:14.586157421 -0500 Change: 2012-02-14 04:57:14.586157421 -0500 the cloned image is sparse,verification passed. move to verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0748.html
It seems that even if I set --nonsparse option, virt-clone always creates sparse disk image.