That it’s possible to resize an existing Lima VM’s disk
Lima VMs store their configuration in YAML files and for most properties, a change to this file with limactl edit ...
will make the change take effect when restarting the VM. Unfortunately, this is not true for the disk
property. (See this issue.) It is possible, however, to directly manage the underlying QEMU vm.
Let’s say we have a vm named thevm
, then there will be a file diffdisk
at ~/.lima/thevm/diffdisk
. This is a QEMU disk image that stores your vm’s data. It’s possible to manage the disk image with the qemu-img
command. For example, resizing it to 100GB can be done as follows:
qemu-img ~/.lima/thevm/diffdisk 150G
The disk size change should be visible on the next startup of the vm. You may check this with df
df -h --output=size /
$ Size
146G
after connecting to your Lima VM.