Skip to content

Changing the disk size in lima.yaml should resize the disk #1448

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

Open
jandubois opened this issue Apr 1, 2023 · 1 comment · May be fixed by #3437
Open

Changing the disk size in lima.yaml should resize the disk #1448

jandubois opened this issue Apr 1, 2023 · 1 comment · May be fixed by #3437
Labels
enhancement New feature or request

Comments

@jandubois
Copy link
Member

Just running limactl edit does not change the actual disk image, I guess one has to run qemu-img manually (for now)

qemu-img resize ~/.lima/almalinux-8/diffdisk 30G

qemu-img info ~/.lima/almalinux-8/diffdisk

After that, it seems to have done the rest of the work on next start (changed it in the lima.yaml, to disk: "30GiB").

Originally posted by @afbjorklund in #1446 (reply in thread)

Of course it should only allow increasing the disk size, as reducing it will corrupt the existing partition.

@afbjorklund
Copy link
Member

When doing the qemu-img resize, it does require a special option before attempting to shrink an image.

       `When shrinking images, the "--shrink" option must be given. This informs qemu-img that the user acknowledges all loss of data beyond the truncated image's end.`

Most of the work for these commands to work, has to be done inside the guest image (partioning/resize2fs)

Currently there might be some scripts in place, that will resize an ext4 partition to use the new space available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants