-
Notifications
You must be signed in to change notification settings - Fork 628
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
Assign ssh.localPort
automatically to an available port
#131
Comments
Hostagent should speak REST API over an UNIX socket, and report the port number in GET /v1/info. |
Ok, but wouldn't we want to record the modified information somewhere? Like once you restart the instance with modified RAM or CPU settings, shouldn't the new settings persist for future instance restarts (e.g when the host is rebooted)? |
If we are going to have a command like If we are rather going to have a command like Anyway, the SSH port is ephemeral and should not be inherited after restarting the instance. |
Sounds like a good idea!
I have looked into this in the past for a different project, and this is a hard problem. The existing tools all didn't work correctly (messed up the data, not just the comments). And writing a spec on how such a tool should work proved challenging as well: It is often not clear from formatting alone if a comment refers to the element above or below it.
Agreed. |
PR #285 |
The port may change when the instance is stopped and restarted because the original port may have been taken by a different application (or lima instance) in between.
Question: where should the port be recorded? Do we load
lima.yaml
, modify the port, and store the file back in YAML format? This would drop any comments from the file, but I think it would be the right thing to do.Long term I would like to be able to run e.g.
lima restart default --memory 12GB
and have it modify the config file for me automatically, so there needs to be a machine-writable version of the config eventually anyways.The text was updated successfully, but these errors were encountered: