lima-vm / lima-vm/lima

shared network mode not working on Mac M1

Open
#1,259 35 comments 1 reaction 0 assignees View on GitHub
component/network/vmnet
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

> **Note**
> (by @AkihiroSuda )
>
>
> The following commands are reported to fix the issue on some machines:
>
> ```
> sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
> sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd
> ```

- - -
### Description

### Environment
macOS Monterey version 12.6.2
Apple M1 Pro chip
limactl version 0.14.1

### What I expected
Guest IP address of VM created with `limactl start --name=default template://vmnet` should be accessible (i.e. can be pinged) from host.

### What actually happened
No accessible IP address.

```
❯ limactl list
NAME STATUS SSH VMTYPE ARCH CPUS MEMORY DISK DIR
default Running 127.0.0.1:60022 qemu aarch64 4 4GiB 100GiB ~/.lima/default
❯ lima
am@lima-default:/Users/am$ sudo apt install net-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
net-tools is already the newest version (1.60+git20181103.0eebece-1ubuntu5).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
am@lima-default:/Users/am$ ifconfig
eth0: flags=4163 mtu 1500
inet 192.168.5.15 netmask 255.255.255.0 broadcast 192.168.5.255
inet6 fec0::5055:55ff:fe72:7117 prefixlen 64 scopeid 0x40
inet6 fe80::5055:55ff:fe72:7117 prefixlen 64 scopeid 0x20
ether 52:55:55:72:71:17 txqueuelen 1000 (Ethernet)
RX packets 16673 bytes 23072545 (23.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1307 bytes 146839 (146.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lima0: flags=4163 mtu 1500
inet6 fdc4:fde4:aceb:14bd:5055:55ff:fee7:9ac4 prefixlen 64 scopeid 0x0
inet6 fe80::5055:55ff:fee7:9ac4 prefixlen 64 scopeid 0x20
ether 52:55:55:e7:9a:c4 txqueuelen 1000 (Ethernet)
RX packets 38 bytes 5883 (5.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 65 bytes 10104 (10.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 174 bytes 15527 (15.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 174 bytes 15527 (15.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

### Some notes
- `/etc/sudoers.d/lima` is properly set up.
- `ping 192.168.5.15` times out. `ping 192.168.105.2` times out.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.