Skip to content

Commit 10c9ba2

Browse files
authored
Merge pull request #15624 from spowelljr/warnVirtualBoxMacOS
Warn users if using VirtualBox on macOS 13+
2 parents e7de620 + 5dbb92f commit 10c9ba2

File tree

11 files changed

+45
-0
lines changed

11 files changed

+45
-0
lines changed

cmd/minikube/cmd/start.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
300300
klog.Errorf("Error autoSetOptions : %v", err)
301301
}
302302

303+
virtualBoxMacOS13PlusWarning(driverName)
303304
validateFlags(cmd, driverName)
304305
validateUser(driverName)
305306
if driverName == oci.Docker {
@@ -373,6 +374,22 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
373374
}, nil
374375
}
375376

377+
func virtualBoxMacOS13PlusWarning(driverName string) {
378+
if driverName != "virtualbox" || !detect.MacOS13Plus() {
379+
return
380+
}
381+
driver := "hyperkit"
382+
if runtime.GOARCH == "arm64" {
383+
driver = "qemu"
384+
}
385+
out.WarningT(`Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.
386+
https://minikube.sigs.k8s.io/docs/drivers/docker/
387+
https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/
388+
389+
For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274
390+
`, out.V{"driver": driver})
391+
}
392+
376393
func validateBuiltImageVersion(r command.Runner) {
377394
res, err := r.RunCmd(exec.Command("cat", "/version.json"))
378395
if err != nil {

pkg/minikube/detect/detect.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"os/exec"
2424
"path/filepath"
2525
"runtime"
26+
"strconv"
2627
"strings"
2728

2829
"github.com/klauspost/cpuid"
@@ -165,3 +166,21 @@ func CgroupDriver() string {
165166
return constants.DefaultCgroupDriver // try with default rather than just give up
166167
}
167168
}
169+
170+
// MacOS13Plus returns if the current machine is running macOS 13+
171+
func MacOS13Plus() bool {
172+
if runtime.GOOS != "darwin" {
173+
return false
174+
}
175+
o, err := exec.Command("sw_vers", "-productVersion").Output()
176+
if err != nil {
177+
klog.Warningf("failed to get macOS version: %v", err)
178+
return false
179+
}
180+
major, err := strconv.Atoi(strings.Split(string(o), ".")[0])
181+
if err != nil {
182+
klog.Warningf("failed to convert macOS version to int: %v", err)
183+
return false
184+
}
185+
return major >= 13
186+
}

translations/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
"Downloading VM boot image ...": "Lade VM boot image herunter ...",
179179
"Downloading driver {{.driver}}:": "Lade Treiber {{.driver}} herunter:",
180180
"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": "",
181+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
181182
"Duration until minikube certificate expiration, defaults to three years (26280h).": "Dauer bis das Minikube-Zertifikat abläuft, Default ist drei Jahre (26280 Stunden).",
182183
"ERROR creating `registry-creds-acr` secret": "Fehler beim Erstellen des `registry-creds-acr` Secrets",
183184
"ERROR creating `registry-creds-dpr` secret": "Fehler beim Erstellen des `registry-creds-dpr` Secrets",

translations/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"Downloading VM boot image ...": "Descargando la imagen de arranque de la VM",
184184
"Downloading driver {{.driver}}:": "Descargando el controlador {{.driver}}:",
185185
"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": "",
186+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
186187
"Due to issues with CRI-O post v1.17.3, we need to restart your cluster.": "Debido a problemas con CRI-O post v1.17.3, necesitamos reiniciar tu cluster.",
187188
"Due to networking limitations of driver {{.driver_name}} on {{.os_name}}, {{.addon_name}} addon is not supported.\nAlternatively to use this addon you can use a vm-based driver:\n\n\t'minikube start --vm=true'\n\nTo track the update on this work in progress feature please check:\nhttps://github.com/kubernetes/minikube/issues/7332": "Debido a las limitaciones de red del controlador {{.driver_name}} en {{.os_name}}, el complemento \"{{.addon_name}}\" no está soportado.\nPara usar este complemento, puedes utilizar un controlador basado en vm\n\n\t'minikube start --vm=true'\n\nPara realizar un seguimiento de las actualizaciones de esta función consulte:\nhttps://github.com/kubernetes/minikube/issues/7332",
188189
"Due to networking limitations of driver {{.driver_name}}, {{.addon_name}} addon is not supported. Try using a different driver.": "Debido a limitaciones de red del controlador {{.driver_name}}, el complemento \"{{.addon_name}}\" no está soportado. Intenta usar un controlador diferente.",

translations/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
"Downloading VM boot image ...": "Téléchargement de l'image de démarrage de la VM...",
180180
"Downloading driver {{.driver}}:": "Téléchargement du pilote {{.driver}} :",
181181
"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": "En raison de problèmes DNS, votre cluster peut avoir des problèmes de démarrage et vous ne pourrez peut-être pas extraire d'images\nPlus de détails disponibles sur : https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues",
182+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
182183
"Duration until minikube certificate expiration, defaults to three years (26280h).": "Durée jusqu'à l'expiration du certificat minikube, par défaut à trois ans (26280h).",
183184
"ERROR creating `registry-creds-acr` secret": "ERREUR lors de la création du secret `registry-creds-acr`",
184185
"ERROR creating `registry-creds-dpr` secret": "ERREUR lors de la création du secret `registry-creds-dpr`",

translations/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
"Downloading VM boot image ...": "VM ブートイメージをダウンロードしています...",
170170
"Downloading driver {{.driver}}:": "{{.driver}} ドライバーをダウンロードしています:",
171171
"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": "DNS の問題により、クラスターの起動に問題が発生し、イメージを取得できない場合があります\n詳細については、https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues を参照してください",
172+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
172173
"Duration until minikube certificate expiration, defaults to three years (26280h).": "minikube 証明書の有効期限。デフォルトは 3 年間 (26280h)。",
173174
"ERROR creating `registry-creds-acr` secret": "`registry-creds-acr` シークレット作成中にエラーが発生しました",
174175
"ERROR creating `registry-creds-dpr` secret": "`registry-creds-dpr` シークレット作成中にエラーが発生しました",

translations/ko.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
"Downloading driver {{.driver}}:": "드라이버 {{.driver}} 다운로드 중 :",
189189
"Downloading {{.name}} {{.version}}": "{{.name}} {{.version}} 다운로드 중",
190190
"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": "",
191+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
191192
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
192193
"ERROR creating `registry-creds-acr` secret": "registry-creds-acr` secret 생성 오류",
193194
"ERROR creating `registry-creds-dpr` secret": "`registry-creds-dpr` secret 생성 오류",

translations/pl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
"Downloading driver {{.driver}}:": "",
189189
"Downloading {{.name}} {{.version}}": "Pobieranie {{.name}} {{.version}}",
190190
"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": "",
191+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
191192
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
192193
"ERROR creating `registry-creds-acr` secret": "",
193194
"ERROR creating `registry-creds-dpr` secret": "",

translations/ru.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
"Downloading VM boot image ...": "",
168168
"Downloading driver {{.driver}}:": "",
169169
"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": "",
170+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
170171
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
171172
"ERROR creating `registry-creds-acr` secret": "",
172173
"ERROR creating `registry-creds-dpr` secret": "",

translations/strings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
"Downloading VM boot image ...": "",
168168
"Downloading driver {{.driver}}:": "",
169169
"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": "",
170+
"Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "",
170171
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
171172
"ERROR creating `registry-creds-acr` secret": "",
172173
"ERROR creating `registry-creds-dpr` secret": "",

0 commit comments

Comments
 (0)