07/22/2022, 5:30 PM
Is there any documentation on how the lima VM is configured on macOS? There seems to be a 100GB volume called data-volume on the VM:
Copy code
lima-rancher-desktop:~# ls -l /dev/disk/by-label/data-volume
lrwxrwxrwx    1 root     root            10 Jul 22 17:18 /dev/disk/by-label/data-volume -> ../../vdb1
But it seems it’s mounted on multiple mountpoints, however there is different data in each of them:
Copy code
lima-rancher-desktop:/dev/disk/by-label# mount |grep data-volume
/dev/disk/by-label/data-volume on /mnt/data type ext4 (rw,relatime)
/dev/disk/by-label/data-volume on /etc type ext4 (rw,relatime)
/dev/disk/by-label/data-volume on /home type ext4 (rw,relatime)
/dev/disk/by-label/data-volume on /tmp type ext4 (rw,relatime)
/dev/disk/by-label/data-volume on /usr/local type ext4 (rw,relatime)
/dev/disk/by-label/data-volume on /var/lib type ext4 (rw,relatime)
/dev/disk/by-label/data-volume on /root type ext4 (rw,relatime)
Not sure how that is supposed to work. Also I’d like to know where the 100GB /dev/vdb1 is stored on macOS:
Copy code
lima-rancher-desktop:~# fdisk /dev/vdb
Command (m for help): p
Disk /dev/vdb: 100 GB, 107374182400 bytes, 209715200 sectors
366634 cylinders, 13 heads, 44 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/vdb1    2,0,33      178,12,44         2048  209715199  209713152 99.9G 83 Linux
As I understand from the documentation data volumes are stored in /var/lib/docker/volumes on the lima vm, which is also the data-volume, so vdb1:
Copy code
lima-rancher-desktop:/var/lib/docker/volumes# df -h .
Filesystem                Size      Used Available Use% Mounted on
                         97.9G      1.9G     90.9G   2% /mnt/data
I’m looking at where those are on my macOS host machine.


07/22/2022, 6:02 PM
you should see the basedisk in ~/Library/Application Support/rancher-desktop/lima/0


07/22/2022, 9:28 PM
Note that the
is just a copy of the ISO image, and is read-only. The data volume is stored in the
, and is the volume that has a 100GB size limit by default.
👍 1
Note that this is not a docker volume, but just an external volume to persist data inside the VM. The basedisk ISO is read-only and copied into RAM at runtime, and selected directories are mounted from the data-volume, so those directories persist across reboots. It is slightly more complex, but that is the basic idea behind it.
👍 1


07/24/2022, 7:58 PM
Thank you for this information!