Git Product home page Git Product logo

Comments (5)

rwmjones avatar rwmjones commented on June 26, 2024 1

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.

rwmjones avatar rwmjones commented on June 26, 2024 1

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.

rwmjones avatar rwmjones commented on June 26, 2024

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.

strich avatar strich commented on June 26, 2024

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.

strich avatar strich commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.