File tree 1 file changed +48
-0
lines changed
website/content/en/docs/config
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Resize Disk Size on macOS
3
+ weight : 11
4
+ ---
5
+
6
+ This guide explains how to increase the disk size of a Lima VM running on macOS when you've run out of space.
7
+
8
+ ## Prerequisites
9
+ 1 . Sufficient free disk space on your host.
10
+ 2 . Using ` Qemu ` VM type for the lima.
11
+
12
+ ## Steps to Resize Lima VM Disk
13
+
14
+ 1 . Stop the Lima VM -
15
+ ``` sh
16
+ limactl stop < vm-name>
17
+ ```
18
+
19
+ 2 . Locate your disk files, lima typically uses two disk files:
20
+ - ` basedisk ` : The read-only base image
21
+ - ` diffdisk ` : The writable disk that stores your changes (this is the one you'll resize)
22
+
23
+ These files are usually located in ` ~/.lima/<vm-name>/ ` directory.
24
+
25
+ 3 . Resize the diffdisk file using qemu-img
26
+ ``` sh
27
+ qemu-img resize ~ /.lima/< vm-name> /diffdisk < new-size>
28
+ ```
29
+ Example for 200GB:
30
+ ```
31
+ qemu-img resize ~/.lima/<vm-name>/diffdisk 200G
32
+ ```
33
+
34
+ > Note: You may see a warning about the raw format not being specified. This is normal and can be avoided by explicitly specifying the format:
35
+ > ` qemu-img resize -f raw ~/.lima/<vm-name>/diffdisk 200G `
36
+
37
+
38
+ 4 . Start the Lima VM -
39
+ ```
40
+ limactl start <vm-name>
41
+ ```
42
+ The filesystem will be automatically resized by ` systemd-growfs ` on boot, you will see something like below:
43
+
44
+ ``` sh
45
+ systemd-growfs[441]: Successfully resized " /" to 199.8G bytes
46
+ ```
47
+
48
+ > Note: You can verify the new size via ` df -h / ` .
You can’t perform that action at this time.
0 commit comments