Skip to content

Commit

Permalink
Add advice message to increase cpus
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Feb 8, 2021
1 parent cc2bf6a commit 9481787
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,18 @@ func validateCPUCount(drvName string) {
}

if si.CPUs < cpuCount {

if driver.IsDockerDesktop(drvName) {
out.Step(style.Empty, `- Ensure your {{.driver_name}} daemon has access to enough CPU/memory resources.`, out.V{"driver_name": drvName})
if runtime.GOOS == "darwin" {
out.Step(style.Empty, `- Docs https://docs.docker.com/docker-for-mac/#resources`, out.V{"driver_name": drvName})
}
if runtime.GOOS == "windows" {
out.String("\n\t")
out.Step(style.Empty, `- Docs https://docs.docker.com/docker-for-windows/#resources`, out.V{"driver_name": drvName})
}
}

exitIfNotForced(reason.RsrcInsufficientCores, "Requested cpu count {{.requested_cpus}} is greater than the available cpus of {{.avail_cpus}}", out.V{"requested_cpus": cpuCount, "avail_cpus": si.CPUs})
}

Expand Down

0 comments on commit 9481787

Please sign in to comment.