diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index 7cd789c770fc..c78d5d9b1752 100755 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -856,14 +856,28 @@ func tryRegistry(r command.Runner, driverName, imageRepository, ip string) { } opts = append(opts, fmt.Sprintf("https://%s/", imageRepository)) - if rr, err := r.RunCmd(exec.Command("curl", opts...)); err != nil { + cmd := exec.Command("curl", opts...) + if rr, err := r.RunCmd(cmd); err != nil { + outside := true klog.Warningf("%s failed: %v", rr.Args, err) - out.WarningT("This {{.type}} is having trouble accessing https://{{.repository}}", out.V{"repository": imageRepository, "type": driver.MachineType(driverName)}) - out.ErrT(style.Tip, "To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/") + // using QEMU with the user network if driver.IsQEMU(driverName) && ip == "127.0.0.1" { out.WarningT("Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues") } + // now we shall also try whether this registry is reachable outside the machine + // so that we can tell in the logs that if the user's computer had any network issue or could it be related to a network module config change in minikbue ISO + if err := cmd.Run(); err != nil { + outside = false + } + if !outside { + // both inside and outside failed + out.WarningT("This {{.type}} is also having trouble accessing https://{{.repository}} both inside and outside the minikube ", out.V{"repository": imageRepository, "type": driver.MachineType(driverName)}) + } else { + // only inside the minikube failed + out.WarningT("This {{.type}} is having trouble accessing https://{{.repository}} only inside the minikube", out.V{"repository": imageRepository, "type": driver.MachineType(driverName)}) + } + out.ErrT(style.Tip, "To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/") } }