From 8b84fa7f7a4c84fe89504b705b0b9c75f02192eb Mon Sep 17 00:00:00 2001 From: BLasan Date: Sun, 7 Feb 2021 01:06:35 +0530 Subject: [PATCH] Add condition to check --cpus count with available cpu count --- cmd/minikube/cmd/start.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 08b9b0a21247..46c0851c6a05 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -1029,6 +1029,10 @@ func validateCPUCount(drvName string) { } + if si.CPUs < cpuCount { + 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}) + } + // looks good if si.CPUs >= 2 { return