Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limactl disk: Do not use qemu-img for raw disks #3180

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nirs
Copy link
Member

@nirs nirs commented Jan 30, 2025

Fix limactl disk create and limactl disk resize to use nativeimgutil for creating and resizing disks using raw format.

There are special cases (using direct I/O on certain file systems) when creating a raw image should be done with qemu-img, but these are not relevant to lima on macOS.

With this change we have no dependency on qemu when using VZ instance.

This change does not fix the issue of default "qcow2" disk format. Users must specify the disk format when creating additional disks for VZ instance:

limactl disk create --format raw

Unfinished:

  • Needs tests for nativeimgutil and disk command

Fixes: #2853

Fix `limactl disk create` and `limactl disk resize` to use nativeimgutil
for creating and resizing disks using raw format.

There are special cases (using direct I/O on certain file systems) when
creating a raw image should be done with qemu-img, but these are not
relevant to lima on macOS.

With this change we have no dependency on qemu when using VZ instance.

This change does not fix the issue of default "qcow2" disk format.
Users must specify the disk format when creating additional disks for VZ
instance:

    limactl disk create --format raw

Unfinished:
- Needs tests for nativeimgutil and disk command

Fixes: lima-vm#2853
Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs force-pushed the limactl-disk-no-qemu branch from b691ad5 to be8ad7a Compare January 30, 2025 21:38
@AkihiroSuda AkihiroSuda added this to the v1.1.0 (tentative) milestone Jan 31, 2025
@AkihiroSuda AkihiroSuda modified the milestones: v1.0.5, v1.1 (tentative) Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

limactl disk should not depend on qemu-img for raw disks
2 participants