lima-vm / lima-vm/lima

cidata: Metric not respected with fedora template

Open
#3,124 1 comment 0 reactions 0 assignees View on GitHub
bug guest/fedora
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### Description

We specify route-metric: N in network-config, but the settings is not respected in Fedora.

Test yaml:

```
vmType: vz
images:
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
arch: "x86_64"
digest: "sha256:6205ae0c524b4d1816dbd3573ce29b5c44ed26c9fbc874fbe48c41c89dd0bac2"
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-41-1.4.aarch64.qcow2"
arch: "aarch64"
digest: "sha256:085883b42c7e3b980e366a1fe006cd0ff15877f7e6e984426f3c6c67c7cc2faa"
cpus: 2
memory: 2g
plain: true
networks:
- socket: /var/run/socket_vmnet
```

network-config generated by lima:

```
# cat /mnt/lima-cidata/network-config
version: 2
ethernets:
eth0:
match:
macaddress: '52:55:55:b9:4a:44'
dhcp4: true
set-name: eth0
dhcp4-overrides:
route-metric: 200
dhcp-identifier: mac
nameservers:
addresses:
- 192.168.5.2
lima0:
match:
macaddress: '52:55:55:2c:25:d8'
dhcp4: true
set-name: lima0
dhcp4-overrides:
route-metric: 100
dhcp-identifier: mac
```

Actual routes:

```
# ip r
default via 192.168.5.2 dev eth0 proto dhcp src 192.168.5.15 metric 100
default via 192.168.105.1 dev lima0 proto dhcp src 192.168.105.3 metric 101
...
```

Expected routes:

```
default via 192.168.105.1 dev lima0 proto dhcp src 192.168.105.3 metric 100
default via 192.168.5.2 dev eth0 proto dhcp src 192.168.5.15 metric 200
...
```

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.