You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/network.md
+40-3
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,16 @@ During initial cloud-init bootstrap, `iptables` may not yet be installed. In tha
42
42
43
43
If `useHostResolver` is false, then DNS servers can be configured manually in `lima.yaml` via the `dns` setting. If that list is empty, then Lima will either use the slirp DNS (on Linux), or the nameservers from the first host interface in service order that has an assigned IPv4 address (on macOS).
44
44
45
-
## Managed VMNet networks (192.168.105.0/24)
45
+
## VMNet networks
46
+
47
+
VMNet assigns a "real" IP address that is reachable from the host.
48
+
49
+
The configuration steps are different across QEMU and VZ:
50
+
-[QEMU](#qemu)
51
+
-[VZ](#vz)
52
+
53
+
### QEMU
54
+
#### Managed (192.168.105.0/24)
46
55
47
56
Either [`socket_vmnet`](https://github.com/lima-vm/socket_vmnet) (since Lima v0.12) or [`vde_vmnet`](https://github.com/lima-vm/vde_vmnet) (Deprecated)
48
57
is required for adding another guest IP that is accessible from the host and other guests.
@@ -51,6 +60,11 @@ Starting with version v0.7.0 lima can manage the networking daemons automaticall
51
60
`$LIMA_HOME/_config/networks.yaml`. If this file doesn't already exist, it will be created with these default
52
61
settings:
53
62
63
+
<details>
64
+
<summary>Default</summary>
65
+
66
+
<p>
67
+
54
68
```yaml
55
69
# Path to socket_vmnet executable. Because socket_vmnet is invoked via sudo it should be
56
70
# installed where only root can modify/replace it. This means also none of the
@@ -92,6 +106,10 @@ networks:
92
106
netmask: 255.255.255.0
93
107
```
94
108
109
+
</p>
110
+
111
+
</details>
112
+
95
113
Instances can then reference these networks from their `lima.yaml` file:
96
114
97
115
```yaml
@@ -120,7 +138,7 @@ be done via:
120
138
limactl sudoers | sudo tee /etc/sudoers.d/lima
121
139
```
122
140
123
-
## Unmanaged VMNet networks
141
+
#### Unmanaged
124
142
For Lima >= 0.12:
125
143
```yaml
126
144
networks:
@@ -131,7 +149,11 @@ networks:
131
149
# - socket: "/var/run/socket_vmnet"
132
150
```
133
151
134
-
For older Lima releases:
152
+
<details>
153
+
<summary>For older Lima releases</summary>
154
+
155
+
<p>
156
+
135
157
```yaml
136
158
networks:
137
159
# vnl (virtual network locator) points to the vde_switch socket directory,
@@ -147,3 +169,18 @@ networks:
147
169
# # Interface name, defaults to "lima0", "lima1", etc.
148
170
# interface: ""
149
171
```
172
+
</p>
173
+
174
+
</details>
175
+
176
+
### VZ
177
+
178
+
For VZ instances, the "vzNAT" network can be configured as follows:
179
+
```yaml
180
+
networks:
181
+
- vzNAT: true
182
+
```
183
+
184
+
The range of the IP address is not specifiable.
185
+
186
+
The "vzNAT" network does not need the `socket_vmnet` binary and the `sudoers` file.
0 commit comments