rancher-desktop icon indicating copy to clipboard operation
rancher-desktop copied to clipboard

Is there a way to specify disk size for VM on Mac M1?

Open Noksa opened this issue 3 years ago • 6 comments
trafficstars

Preflight Checklist

  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Currently as I can see Rancher Desktop uses 100 Gb as disk size for VM.

But I want to increment the disk size somehow.

Proposed Solution

Specify disk size for VM using GUI

Additional Information

Rancher Desktop 1.0.1

Noksa avatar Feb 06 '22 17:02 Noksa

There is no way to configure this in the UI yet, and no way to increase the size of an existing VM.

However, if you are willing to create a new VM, you can try the following steps:

  • Stop Rancher Desktop
  • Create an override.yaml file with the desired disk size, e.g.
    echo 'disk: "200GiB"' > ~/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml
    
  • Delete the existing VM:
    rm -rf ~/Library/Application\ Support/rancher-desktop/lima/0
    
  • Start Rancher Desktop again and let it create a new VM with a larger data volume

Report back if this works, as I didn't actually test it. 😄

jandubois avatar Feb 06 '22 18:02 jandubois

And I just realized that these instructions are just for macOS, so let me know if you are on a different OS!

jandubois avatar Feb 06 '22 18:02 jandubois

Report back if this works, as I didn't actually test it.

Works with Rancher Desktop 1.4.1 on macos 12.4 (intel)

Sandmania avatar Jun 16 '22 05:06 Sandmania

any chance 'fstrim' can be added/invoked to the machine with 'diffdisk' attached?

jeremyguthrie avatar Aug 25 '22 15:08 jeremyguthrie

any chance 'fstrim' can be added/invoked to the machine with 'diffdisk' attached?

Not to my knowledge. I forgot the details, but a while ago I tried various mechanisms using qemu-img to get it to release the unused space back to the host OS, but none of them worked on macOS.

So the only feasible strategy for now seems to be to set a lower disk limit and/or prune unused images more frequently.

jandubois avatar Aug 26 '22 19:08 jandubois

any chance 'fstrim' can be added/invoked to the machine with 'diffdisk' attached?

Not to my knowledge.

@jeremyguthrie Turns out I was wrong; it is possible. I've created #3158 to implement it, as it is different from specifying the initial max size of the volume.

jandubois avatar Oct 14 '22 03:10 jandubois