canonical / canonical/multipass
Subnet used for default bridge interface for qemu is "random"
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 43
Description
**Describe the bug**
Describe what your problem is.
When you install multipass for the first time, and use the qemu local.driver, there is some kind of logic that picks a seemingly random subnet to use on the default bridge interface. It seems like it can be any `/24` from `10/8`
This makes it not very usable for various different scenarios. For instance, it could clash with another network you use, either locally or via some kind of VPN.
The subnet used needs to be deterministic, or at least configurable, otherwise it does't really work for some users.
It seems like I could probably stop multipass, remove the interface, and hack in the IP ranges and info I need here: `/var/snap/multipass/common/data/multipassd/network`
But, that isn't documents, and presumably not really supported.
**To Reproduce**
How, and what happened?
1. Install multipass, using the qemu driver
1. You might get lucky with the network assignment, you might not
**Expected behavior**
What did you expect to happen?
It should be possible to configure the network range used.
**Logs**
Please provide logs from the daemon, see [accessing logs](https://multipass.run/docs/accessing-logs) on where to find them on your platform.
**Additional info**
```
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
```
```
$ multipass version
multipass 1.12.0
multipassd 1.12.0
```
```
$ multipass get local.driver
qemu
```
**Additional context**
Add any other context about the problem here.
Contributor guide
Research direction
Start by reproducing the first-install behavior with the qemu local.driver and inspect the network state at /var/snap/multipass/common/data/multipassd/network. Check how the subnet is selected and configured, using multipass get local.driver and the reported environment as reference. Done means the default bridge subnet is deterministic or has a supported configuration path that avoids network clashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, ubuntu
- Domain
- infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100