Skip to content

Commit b6e1d07

Browse files
committed
Keep the launchd daemon alive
Working with multiple lima clusters in the recent weeks I found that socket_vmnet is not running for unknown reason. The typical flow is trying to start the clusters, and lima hostagent fails with connection refused with /var/run/socket_vmnet. This happens to me one or more times in the same day. Trying to run a stress test creating and destroying the lima clusters 50 times fails after several runs and from the point of the failure, all runs failed. The issue seems to be that socket_vmnet is stopped by launched because it seems to be idle and it is never started again. Adding the keep alive option eliminated this issue. With this change the daemon is kept running and it should restart after failures. Signed-off-by: Nir Soffer <[email protected]>
1 parent 8513f80 commit b6e1d07

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

launchd/io.github.lima-vm.socket_vmnet.bridged.en0.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<string>/var/log/socket_vmnet/bridged.en0.stdout</string>
2121
<key>RunAtLoad</key>
2222
<true />
23+
<key>KeepAlive</key>
24+
<true />
2325
<key>UserName</key>
2426
<string>root</string>
2527
</dict>

launchd/io.github.lima-vm.socket_vmnet.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<string>/var/log/socket_vmnet/stdout</string>
2020
<key>RunAtLoad</key>
2121
<true />
22+
<key>KeepAlive</key>
23+
<true />
2224
<key>UserName</key>
2325
<string>root</string>
2426
</dict>

0 commit comments

Comments
 (0)