When Lima starts socket_vmnet via startDaemon() in pkg/networks/reconcile/reconcile.go, it calls cmd.Start() and proceeds without checking whether vmnet_start_interface succeeded. If socket_vmnet fails (e.g., VMNET_FAILURE from vmnet.framework), Lima starts QEMU anyway. With --foreground, limactl start then blocks indefinitely waiting for SSH to a VM that has no bridged networking.
socket_vmnet exits immediately on vmnet_start_interface failure and removes its PID file. Lima could detect this by checking the PID file or process liveness after a short delay.
Additionally, vmnet.framework depends on the com.apple.NetworkSharing XPC service. At early boot, this service's Mach port may not be registered yet, causing vmnet_start_interface to return VMNET_FAILURE. Neither socket_vmnet nor Lima waits for this dependency or retries on failure.
This is one of several issues that make Lima unusable for unattended auto-start via LaunchDaemon. See also #2252.
Environment: macOS 15.7.7, Lima 2.1.x (fork), QEMU 11.0.0, Intel x86_64, socket_vmnet bridged mode.
When Lima starts socket_vmnet via
startDaemon()inpkg/networks/reconcile/reconcile.go, it callscmd.Start()and proceeds without checking whethervmnet_start_interfacesucceeded. If socket_vmnet fails (e.g.,VMNET_FAILUREfrom vmnet.framework), Lima starts QEMU anyway. With--foreground,limactl startthen blocks indefinitely waiting for SSH to a VM that has no bridged networking.socket_vmnet exits immediately on
vmnet_start_interfacefailure and removes its PID file. Lima could detect this by checking the PID file or process liveness after a short delay.Additionally, vmnet.framework depends on the
com.apple.NetworkSharingXPC service. At early boot, this service's Mach port may not be registered yet, causingvmnet_start_interfaceto returnVMNET_FAILURE. Neither socket_vmnet nor Lima waits for this dependency or retries on failure.This is one of several issues that make Lima unusable for unattended auto-start via LaunchDaemon. See also #2252.
Environment: macOS 15.7.7, Lima 2.1.x (fork), QEMU 11.0.0, Intel x86_64, socket_vmnet bridged mode.