-
Notifications
You must be signed in to change notification settings - Fork 530
fix: persist auto-assigned network subnet across system restarts #836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: persist auto-assigned network subnet across system restarts #836
Conversation
|
@Ronitsabhaya75 Thank your for the contribution, but I don't think we want to merge this. The point of auto assignment is to let vmnet pick a free network. Consider the following:
If a user wants to set a fixed CIDR for the default subnet, they can do so explicitly with |
|
The other problem with this as it stands is: container network create foowill overwrite the default subnet setting even though it's not the default subnet. |
|
@jglogan , unfortunately: There is and a section on docs/technical-overview.md for macOS 15: Default changes with this command works: But if I just run: And then kill the VM; and do: Log show: |
|
Could you describe what you mean by "kill the VM"? What are you doing to achieve that? Can you capture the logs by running the following in one terminal and then starting the container service with that setting in another? log stream --debug --info --predicate 'subsystem = "com.apple.container" or subsystem = "com.apple.NetworkSharing"' |
|
Killing in Activity Monitor Without corruption: This machine has: On my machine which I tried to set the previous commands to change the default network: After I deleted the new default subnet that was just added with |
Type of Change
Motivation and Context
Closes #835
In
ReservedVmnetNetwork.swift, after retrieving the auto-assigned subnet from macOS, save it toDefaultsStoreso it's reused on subsequent restarts.Code Changes:
Testing