finch icon indicating copy to clipboard operation
finch copied to clipboard

Make the size of the persistent disk configurable

Open davidhsingyuchen opened this issue 1 year ago • 1 comments

What is the problem you're trying to solve?.

I have an container image that is larger than the size of the persistent disk, which is currently hardcoded to 50G:

https://github.com/runfinch/finch/blob/fb78051eaf1aae7b6eb99707f36489bb52818021/pkg/disk/disk.go#L25

More info: https://github.com/runfinch/finch/discussions/231

Describe the feature you'd like

A field in finch.yaml that lets me specify the size of the persistent disk. After I update the value, stop the VM, and then start the VM, the value should take effect.

davidhsingyuchen avatar Mar 08 '23 00:03 davidhsingyuchen

Until this gets implemented, a workaround to increase the size of the VM Disk (replace +50G with an appropriate value):

# stop VM
finch vm stop

# Resize the disk image
/Applications/Finch/lima/bin/qemu-img resize /Applications/Finch/lima/data/_disks/finch/datadisk +50G

# Start the VM
finch vm start

# Grow the partition
LIMA_HOME=/Applications/Finch/lima/data /Applications/Finch/lima/bin/limactl shell finch sudo bash -c "growpart /dev/vdb 1"

# Resize the fs
LIMA_HOME=/Applications/Finch/lima/data /Applications/Finch/lima/bin/limactl shell finch sudo bash -c "resize2fs /dev/vdb1"

To check this has been implemented:

LIMA_HOME=/Applications/Finch/lima/data /Applications/Finch/lima/bin/limactl shell finch df -H

ollypom avatar Jun 05 '23 15:06 ollypom