lima-vm / lima-vm/lima

Consider using imago based tool as replacement for qemu-img

Open
#3,210 10 comments 0 reactions 0 assignees View on GitHub
component/vz kind/refactoring
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

We are using https://github.com/lima-vm/go-qcow2reader to convert qcow2 images to raw.

For uncompressed images we have good performance (similar to qemu-img), but for uncompressed images (the common case for cloud images) we are much slower.

There is the [imago](https://docs.rs/imago/latest/imago/index.html) rust library supporting reading and writing qcow2 images, used by [libkrun](https://github.com/containers/libkrun) to run vms sing qcow2 images.

We can use it or a simple tool written with it to do qcow2 conversion, and save the work of maintaining a pretty complicated go code.

Converting images is very slow, and delegating the work to external tool is better than adding complicated libraries in the same process.

Tasks:
- Check if we already have a tool using this library for converting image format
- If it does not exist, write one - should be similar to https://github.com/lima-vm/go-qcow2reader/blob/master/convert/convert.go
- Evaluate the performance of converting compressed images (most common) and uncompressed images
- We probably don't want to add another language to the project, but packing a small tool should be fine

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.