colima
colima copied to clipboard
Colima daemon
Currently we always have to manually start colima when starting our macbook, however it would be nice to have it as a daemon so that it can start automatically. Is there any reason why this has not been done yet?
+1
It would be really nice to be able to start colima with launchctl and brew services.
I am interested in taking this on but curious about what the end result might look like.
The simple path forward is a Colima process per vm, most configurations are likely to only have one and this is how qemu operates. I would think the IPC surface for this is minimal and just operating like detach mode as docker does. Meaning, do not attach user stdout/stdin/stderr. The result is a process to only supervise the qemu process spawned.
Taking some inspiration from this library, https://pkg.go.dev/github.com/sevlyar/go-daemon?utm_source=godoc. Not taking the dependency on the library, unless that is okay?
Or is there a desire for this to introduce a true daemon that manages all Colima instances?
Thoughts?
I spent some time this weekend and got to what I would consider a draft PR.
However, this same library is used to launch a few other daemons, and I don't believe this nesting will work.
Qemu exits after complaining about missing the gvproxy domain socket?
Definitely looks a lot like this. https://github.com/sevlyar/go-daemon/issues/82
@jbreiding my bad! I actually composed a response but just realised I didn't send it. You do not need to worry about background daemons btw, and it is not needed in this case.
I am working an autostart
config for the VM, as well a new start-all
command.
In essence all that will be required to start all VMs will be
colima start-all --filter=autostart=true
The only thing left would be a user launchd file that will include the above command.
@abiosoft no worries at all, it was a nice little weekend adventure.
btw, do you use vscode for debugging? If you do would you mind sharing the debug configuration?
I see the .gitignore
ignores this folder and I had a painful time launching with debug to troubleshoot what was happening with the daemon process.
Looks like the work for a service with brew can be leveraged from here. #96
Hello, Is there any news regarding this issue? On my system, the drives can take up to a minute to mount at boot, so it would be useful to be able to start colima as a launchd service to wait until the mounting is done.