abiosoft/colima · error
no IP address assigned to network interface
Error message
no IP address assigned to network interface
What it means
Thrown inside an a.Rtry('waiting for VM IP address', 5s, 4 attempts) loop while installing the k3s cluster: limautil.IPAddress(profile) returned an empty string, meaning the Lima VM's network interface had not yet acquired (or failed to acquire) an IP address. The IP is needed to seed k3s args (--advertise-address / --flannel-iface), so the retry aborts and k3s installation fails.
Source
Thrown at environment/container/kubernetes/k3s.go:165
// install k3s last to ensure it is the last step
downloadPath := "/tmp/k3s-install.sh"
url := "https://raw.githubusercontent.com/k3s-io/k3s/" + k3sVersion + "/install.sh"
a.Add(func() error {
r := downloader.Request{URL: url}
return downloader.DownloadToGuest(host, guest, r, downloadPath)
})
a.Add(func() error {
return guest.Run("sudo", "install", downloadPath, "/usr/local/bin/k3s-install.sh")
})
args := append([]string{
"--write-kubeconfig-mode", "644",
}, k3sArgs...)
a.Retry("waiting for VM IP address", time.Second*5, 4, func(retryCount int) error {
ipAddress := limautil.IPAddress(config.CurrentProfile().ID)
if ipAddress == "" {
return fmt.Errorf("no IP address assigned to network interface")
}
if ipAddress == "127.0.0.1" {
args = append(args, "--flannel-iface", "eth0")
} else {
if !hasK3sArg(k3sArgs, "--advertise-address") {
args = append(args, "--advertise-address", ipAddress)
}
if !hasK3sArg(k3sArgs, "--flannel-iface") {
args = append(args, "--flannel-iface", limautil.NetInterface)
}
}
return nil
})
switch containerRuntime {
case docker.Name:
args = append(args, "--docker")View on GitHub (pinned to c3a5f9184d)
Solutions
- Just retry 'colima start --kubernetes' — a transient DHCP race usually resolves on the second run.
- Check that the VM actually has an IP: 'limactl list', 'colima ssh -- ip addr', and look at eth0/lima0; if no lease, inspect the lima instance logs ('limactl list --format json', ~/.lima/<profile>/log*) for slirp/vmnet errors.
- Disable or fix custom networks: start with plain defaults (no --network-address, no custom 'networks:' entries) to confirm vmnet is the culprit.
- If a VPN/firewall is active, disconnect it or allow the vmnet/gvisor-slirp helper processes, then retry.
- Recreate the VM if the state is wedged: 'colima delete -f && colima start --kubernetes'.
Example fix
// before
ipAddress := limautil.IPAddress(config.CurrentProfile().ID)
if ipAddress == "" {
return fmt.Errorf("no IP address assigned to network interface")
}
// after (extend patience before failing)
if ipAddress == "" {
return fmt.Errorf("no IP address assigned to network interface: %w", errRetry)
}
// i.e. rely on the enclosing a.Retry("waiting for VM IP address", 5*time.Second, 12, ...) with more attempts Defensive patterns
Strategy: retry
Validate before calling
// probe the VM IP before invoking k3s provisioning
ip := limautil.IPAddress(config.CurrentProfile().ID)
if ip == "" {
return fmt.Errorf("vm has no IP yet; wait for boot before provisioning kubernetes")
} Try / catch
// wrap the install call in a retry with backoff, the code already retries 4x5s
err := retry(12, 5*time.Second, func() error {
if ip := limautil.IPAddress(profile); ip == "" {
return fmt.Errorf("no IP address assigned to network interface")
}
return nil
}) Prevention
- Avoid custom vmnet networks unless needed; default slirp always yields an IP quickly.
- Give the VM a few seconds after 'colima start' before scripting kubernetes provisioning steps.
- Disable/allow-list VPN and firewall software for the lima/gvproxy processes.
When it happens
Trigger: Running k3s provisioning immediately after 'colima start' while the guest's DHCP/interface bring-up is still in flight (all 4×5s retries exhausted); the VM booted but eth0/lima0 has no lease because vmnet/networks are broken; a custom Lima network config (e.g. --network-address with a failed vmnet daemon) leaving the interface unconfigured; or the Lima instance state file not yet exposing the IP via limautil.IPAddress.
Common situations: Slow or overloaded macOS machine where the VM takes >20s to get a lease; Hyper-V/QEMU backend hangs; vmnet network misconfiguration (networks: in lima yaml) preventing DHCP; vpn or firewall (Little Snitch, corporate VPN) blocking the guest DHCP; colima resume/start races where limactl has not finished writing instance metadata.
Related errors
- dependency check failed for VM: %w
- error starting vm: %w
- error stopping vm: %w
- error during teardown of vm: %w
- error stopping :%w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/aa8a92d0795f219c.
Report an issue: GitHub.