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: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,7 +435,8 @@ The `copy` command only works for instances that have been created by lima 0.5.0
435
435
436
436
The default guest IP 192.168.5.15 is not accessible from the host and other guests.
437
437
438
-
To add another IP address that is accessible from the host and other virtual machines, enable [`vde_vmnet`](https://github.com/lima-vm/vde_vmnet).
438
+
To add another IP address that is accessible from the host and other virtual machines, enable [`socket_vmnet`](https://github.com/lima-vm/socket_vmnet) (since Lima v0.12)
439
+
or [`vde_vmnet`](https://github.com/lima-vm/vde_vmnet) (Deprecated).
Copy file name to clipboardExpand all lines: docs/network.md
+42-31Lines changed: 42 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The guest IP address is set to `192.168.5.15`.
10
10
11
11
This IP address is not accessible from the host by design.
12
12
13
-
Use [vde_vmnet](https://github.com/lima-vm/vde_vmnet) to allow accessing the guest IP from the host and other guests.
13
+
Use VMNet (see below) to allow accessing the guest IP from the host and other guests.
14
14
15
15
### Host IP (192.168.5.2)
16
16
@@ -42,50 +42,32 @@ 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
-
## `vde_vmnet` (192.168.105.0/24)
45
+
## Managed VMNet networks (192.168.105.0/24)
46
46
47
-
[`vde_vmnet`](https://github.com/lima-vm/vde_vmnet) is required for adding another guest IP that is accessible from
48
-
the host and other guests.
49
-
50
-
To enable `vde_vmnet` (in addition the user-mode network), add the following lines to the YAML after installing `vde_vmnet`.
51
-
52
-
```yaml
53
-
networks:
54
-
# vnl (virtual network locator) points to the vde_switch socket directory,
55
-
# optionally with vde:// prefix
56
-
# - vnl: "vde:///var/run/vde.ctl"
57
-
# # VDE Switch port number (not TCP/UDP port number). Set to 65535 for PTP mode.
58
-
# # Default: 0
59
-
# switchPort: 0
60
-
# # MAC address of the instance; lima will pick one based on the instance name,
61
-
# # so DHCP assigned ip addresses should remain constant over instance restarts.
62
-
# macAddress: ""
63
-
# # Interface name, defaults to "lima0", "lima1", etc.
64
-
# interface: ""
65
-
```
66
-
67
-
The IP address range is typically `192.168.105.0/24`, but depends on the configuration of `vde_vmnet`.
68
-
See [the documentation of `vde_vmnet`](https://github.com/lima-vm/vde_vmnet) for further information.
69
-
70
-
## Managed VMNet networks (via vde_vmnet)
47
+
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
+
is required for adding another guest IP that is accessible from the host and other guests.
71
49
72
50
Starting with version v0.7.0 lima can manage the networking daemons automatically. Networks are defined in
73
51
`$LIMA_HOME/_config/networks.yaml`. If this file doesn't already exist, it will be created with these default
74
52
settings:
75
53
76
54
```yaml
77
-
#Paths to vde executables. Because vde_vmnet is invoked via sudo it should be
55
+
#Path to socket_vmnet executable. Because socket_vmnet is invoked via sudo it should be
78
56
# installed where only root can modify/replace it. This means also none of the
79
57
# parent directories should be writable by the user.
80
58
#
81
59
# The varRun directory also must not be writable by the user because it will
82
-
# include the vde_vmnet pid files. Those will be terminated via sudo, so replacing
83
-
# the pid files would allow killing of arbitrary privileged processes. varRun
60
+
# include the socket_vmnet pid file. Those will be terminated via sudo, so replacing
61
+
# the pid file would allow killing of arbitrary privileged processes. varRun
84
62
# however MUST be writable by the daemon user.
85
63
#
86
64
# None of the paths segments may be symlinks, why it has to be /private/var
87
65
# instead of /var etc.
88
66
paths:
67
+
# socketVMNet requires Lima >= 0.12 .
68
+
# socketVMNet has precedence over vdeVMNet.
69
+
socketVMNet: /opt/socket_vmnet/bin/socket_vmnet
70
+
# vdeSwitch and vdeVMNet are DEPRECATED.
89
71
vdeSwitch: /opt/vde/bin/vde_switch
90
72
vdeVMNet: /opt/vde/bin/vde_vmnet
91
73
varRun: /private/var/run/lima
@@ -115,8 +97,9 @@ Instances can then reference these networks from their `lima.yaml` file:
115
97
```yaml
116
98
networks:
117
99
# Lima can manage daemons for networks defined in $LIMA_HOME/_config/networks.yaml
118
-
# automatically. Both vde_switch and vde_vmnet binaries must be installed into
100
+
# automatically. The socket_vmnet must be installed into
119
101
# secure locations only alterable by the "root" user.
102
+
# The same applies to vde_switch and vde_vmnet for the deprecated VDE mode.
120
103
# - lima: shared
121
104
# # MAC address of the instance; lima will pick one based on the instance name,
122
105
# # so DHCP assigned ip addresses should remain constant over instance restarts.
@@ -129,10 +112,38 @@ The network daemons are started automatically when the first instance referencin
129
112
and will stop automatically once the last instance has stopped. Daemon logs will be stored in the
130
113
`$LIMA_HOME/_networks`directory.
131
114
132
-
Since the commands to start and stop the `vde_vmnet` daemon requires root, the user either must
115
+
Since the commands to start and stop the `socket_vmnet` daemon (or the `vde_vmnet` daemon) requires root, the user either must
133
116
have password-less `sudo` enabled, or add the required commands to a `sudoers` file. This can
134
117
be done via:
135
118
136
119
```shell
137
120
limactl sudoers | sudo tee /etc/sudoers.d/lima
138
121
```
122
+
123
+
## Unmanaged VMNet networks
124
+
For Lima >= 0.12:
125
+
```yaml
126
+
networks:
127
+
# Lima can also connect to "unmanaged" networks addressed by "socket". This
128
+
# means that the daemons will not be controlled by Lima, but must be started
129
+
# before the instance. The interface type (host, shared, or bridged) is
130
+
# configured in socket_vmnet and not in lima.
131
+
# - socket: "/var/run/socket_vmnet"
132
+
```
133
+
134
+
For older Lima releases:
135
+
```yaml
136
+
networks:
137
+
# vnl (virtual network locator) points to the vde_switch socket directory,
138
+
# optionally with vde:// prefix
139
+
# ⚠️ vnl is deprecated, use socket.
140
+
# - vnl: "vde:///var/run/vde.ctl"
141
+
# # VDE Switch port number (not TCP/UDP port number). Set to 65535 for PTP mode.
142
+
# # Builtin default: 0
143
+
# switchPort: 0
144
+
# # MAC address of the instance; lima will pick one based on the instance name,
145
+
# # so DHCP assigned ip addresses should remain constant over instance restarts.
146
+
# macAddress: ""
147
+
# # Interface name, defaults to "lima0", "lima1", etc.
0 commit comments