Comments (5)
In theory that's right, but for virt-builder
we use virt-sparsify --in-place
+ xz
and I doubt there's any noticeable difference after compression, and probably barely anything before compression.
Back in the old days copying sparsification was necessary because the relevant qemu & kernel & filesystems didn't support the necessary trim/discard operations for in-place sparsify. But that has not been true for a very long time.
from libguestfs.
Assuming "zero the image" means sparsify and "compact" means convert it to qcow2, then not really. You could convert it to qcow2 first (qemu-img convert
will do zeroes detection on the raw bits which will reduce the image size a lot), then run virt-sparsify on the result which will free space used by deleted files.
from libguestfs.
I would definitely use the --in-place
option (note it overwrites the input) as that is vastly more efficient, and basically supported everywhere these days.
from libguestfs.
Its important I get as much out of it as possible and afaik in place isn't as efficient from a space savings pov right?
from libguestfs.
Okay I see! The command does successfully run thank you!
So you know if it's possible to zero the image and compact it within the same toolset? I'm currently running qemu-img after this to rewrite it to another file to remove the zerod space.
from libguestfs.
Related Issues (20)
- I want to change the sid of windows guest (qemu guest)๏ผwhat can i do? HOT 2
- virt-sparsify spurious errors and behavior when GPT partition table is damaged. HOT 1
- Nested partitions in luks partition
- Guestfish removes query string from URI HOT 1
- Read support for MAME CHD format HOT 1
- Guestfish Disk format command failing HOT 7
- [virt-sysprep] RFE: Add an operation to clean cloud-init data HOT 4
- dhclient EOLed HOT 5
- libguestfs: error : does not redirect errors to custom log file using message_callback HOT 3
- Kernel 6.5.4 doesn't work with libguestfs HOT 4
- Build fails with `No rule to make target 'guestfs_protocol.c', needed by 'all'. Stop.`. HOT 4
- virt-ls: no operating system was found on this disk HOT 6
- Migration to organization HOT 4
- Read-only NBD using direct backend HOT 2
- 1.52.0: btrfs related c_api/tests are failing (unable to create quota group: Invalid argument) HOT 8
- how libguestfs using qemu-system-aarch64 in x86_64? HOT 1
- Python how-to incorrect exception name HOT 1
- 1.52.0: c-api related tests fail (`libguestfs: trace: blockdev_setrw = -1 (error)`) HOT 22
- 1.52.0 + Python 3.12: discard/test-discard.pl fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libguestfs.