Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark VMware driver as unsupported #16233

Merged
merged 3 commits into from Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 17 additions & 6 deletions cmd/minikube/cmd/start.go
Expand Up @@ -300,6 +300,7 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
}

virtualBoxMacOS13PlusWarning(driverName)
vmwareUnsupported(driverName)
validateFlags(cmd, driverName)
validateUser(driverName)
if driverName == oci.Docker {
Expand Down Expand Up @@ -374,23 +375,33 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
}

func virtualBoxMacOS13PlusWarning(driverName string) {
if driverName != "virtualbox" || !detect.MacOS13Plus() {
if !driver.IsVirtualBox(driverName) || !detect.MacOS13Plus() {
return
}
driver := "hyperkit"
suggestedDriver := driver.HyperKit
if runtime.GOARCH == "arm64" {
driver = "qemu"
suggestedDriver = driver.QEMU
}
out.WarningT(`Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.
https://minikube.sigs.k8s.io/docs/drivers/docker/
https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/

For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274
`, out.V{"driver": driver})
`, out.V{"driver": suggestedDriver})
}

func vmwareUnsupported(driverName string) {
if !driver.IsVMware(driverName) {
return
}
exit.Message(reason.DrvUnsupported, `Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.
spowelljr marked this conversation as resolved.
Show resolved Hide resolved

For more details see: https://github.com/kubernetes/minikube/issues/16221
`)
}

func validateBuiltImageVersion(r command.Runner, driverName string) {
if driverName == driver.None {
if driver.IsNone(driverName) {
return
}
res, err := r.RunCmd(exec.Command("cat", "/version.json"))
Expand Down Expand Up @@ -1459,7 +1470,7 @@ func noLimitMemory(sysLimit, containerLimit int, drvName string) int {
}
// Recommend 1GB to handle OS/VM overhead
sysOverhead := 1024
if drvName == "virtualbox" {
if driver.IsVirtualBox(drvName) {
// VirtualBox fully allocates all requested memory on start, it doesn't dynamically allocate when needed like other drivers
// Because of this allow more system overhead to prevent out of memory issues
sysOverhead = 1536
Expand Down
10 changes: 10 additions & 0 deletions pkg/minikube/driver/driver.go
Expand Up @@ -190,6 +190,16 @@ func IsSSH(name string) bool {
return name == SSH
}

// IsVirtualBox checks if the driver is VirtualBox
func IsVirtualBox(name string) bool {
return name == VirtualBox
}

// IsVMware checks if the driver is VMware
func IsVMware(name string) bool {
return name == VMware
}

// AllowsPreload returns if preload is allowed for the driver
func AllowsPreload(driverName string) bool {
return !BareMetal(driverName) && !IsSSH(driverName)
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/node/start.go
Expand Up @@ -922,7 +922,7 @@ func addCoreDNSEntry(runner command.Runner, name, ip string, cc config.ClusterCo
func warnVirtualBox() {
var altDriverList strings.Builder
for _, choice := range driver.Choices(true) {
if choice.Name != "virtualbox" && choice.Priority != registry.Discouraged && choice.State.Installed && choice.State.Healthy {
if !driver.IsVirtualBox(choice.Name) && choice.Priority != registry.Discouraged && choice.State.Installed && choice.State.Healthy {
altDriverList.WriteString(fmt.Sprintf("\n\t- %s", choice.Name))
}
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/minikube/reason/reason.go
Expand Up @@ -286,6 +286,8 @@ var (
}
// minikube failed to bind container ports to host ports
DrvPortForward = Kind{ID: "DRV_PORT_FORWARD", ExitCode: ExDriverError}
// the driver is currently not supported by minikube
DrvUnsupported = Kind{ID: "DRV_UNSUPPORTED", ExitCode: ExDriverUnsupported}
// the driver in use does not support multi-node clusters
DrvUnsupportedMulti = Kind{ID: "DRV_UNSUPPORTED_MULTINODE", ExitCode: ExDriverConflict}
// the specified driver is not supported on the host OS
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/registry/drvs/vmware/vmware.go
Expand Up @@ -32,8 +32,8 @@ func init() {
err := registry.Register(registry.DriverDef{
Name: driver.VMware,
Config: configure,
Default: true,
Priority: registry.Default,
Default: false,
Priority: registry.Deprecated,
Status: status,
})
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions site/content/en/docs/contrib/errorcodes.en.md
Expand Up @@ -223,6 +223,9 @@ minikube failed to access the driver control plane or API endpoint
"DRV_PORT_FORWARD" (Exit code ExDriverError)
minikube failed to bind container ports to host ports

"DRV_UNSUPPORTED" (Exit code ExDriverUnsupported)
the driver is currently not supported by minikube

"DRV_UNSUPPORTED_MULTINODE" (Exit code ExDriverConflict)
the driver in use does not support multi-node clusters

Expand Down
1 change: 1 addition & 0 deletions translations/de.json
Expand Up @@ -181,6 +181,7 @@
"Downloading driver {{.driver}}:": "Lade Treiber {{.driver}} herunter:",
"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": "",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "Dauer bis das Minikube-Zertifikat abläuft, Default ist drei Jahre (26280 Stunden).",
"ERROR creating `registry-creds-acr` secret": "Fehler beim Erstellen des `registry-creds-acr` Secrets",
"ERROR creating `registry-creds-dpr` secret": "Fehler beim Erstellen des `registry-creds-dpr` Secrets",
Expand Down
1 change: 1 addition & 0 deletions translations/es.json
Expand Up @@ -189,6 +189,7 @@
"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.",
"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",
"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.",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
"ERROR creating `registry-creds-acr` secret": "ERROR creando el secreto `registry-creds-acr`",
"ERROR creating `registry-creds-dpr` secret": "ERROR creando el secreto `registry-creds-dpr`",
Expand Down
1 change: 1 addition & 0 deletions translations/fr.json
Expand Up @@ -183,6 +183,7 @@
"Downloading driver {{.driver}}:": "Téléchargement du pilote {{.driver}} :",
"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",
"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": "En raison de changements dans macOS 13+, minikube ne prend actuellement pas en charge VirtualBox. Vous pouvez utiliser des pilotes alternatifs tels que docker ou {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/ docs/drivers/{{.driver}}/\n\n Pour plus de détails sur le problème, voir : https://github.com/kubernetes/minikube/issues/15274\n",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "Durée jusqu'à l'expiration du certificat minikube, par défaut à trois ans (26280h).",
"ERROR creating `registry-creds-acr` secret": "ERREUR lors de la création du secret `registry-creds-acr`",
"ERROR creating `registry-creds-dpr` secret": "ERREUR lors de la création du secret `registry-creds-dpr`",
Expand Down
1 change: 1 addition & 0 deletions translations/ja.json
Expand Up @@ -173,6 +173,7 @@
"Downloading driver {{.driver}}:": "{{.driver}} ドライバーをダウンロードしています:",
"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 を参照してください",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "minikube 証明書の有効期限。デフォルトは 3 年間 (26280h)。",
"ERROR creating `registry-creds-acr` secret": "`registry-creds-acr` シークレット作成中にエラーが発生しました",
"ERROR creating `registry-creds-dpr` secret": "`registry-creds-dpr` シークレット作成中にエラーが発生しました",
Expand Down
1 change: 1 addition & 0 deletions translations/ko.json
Expand Up @@ -191,6 +191,7 @@
"Downloading {{.name}} {{.version}}": "{{.name}} {{.version}} 다운로드 중",
"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": "",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
"ERROR creating `registry-creds-acr` secret": "registry-creds-acr` secret 생성 오류",
"ERROR creating `registry-creds-dpr` secret": "`registry-creds-dpr` secret 생성 오류",
Expand Down
1 change: 1 addition & 0 deletions translations/pl.json
Expand Up @@ -191,6 +191,7 @@
"Downloading {{.name}} {{.version}}": "Pobieranie {{.name}} {{.version}}",
"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": "",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
"ERROR creating `registry-creds-acr` secret": "",
"ERROR creating `registry-creds-dpr` secret": "",
Expand Down
1 change: 1 addition & 0 deletions translations/ru.json
Expand Up @@ -170,6 +170,7 @@
"Downloading driver {{.driver}}:": "",
"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": "",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
"ERROR creating `registry-creds-acr` secret": "",
"ERROR creating `registry-creds-dpr` secret": "",
Expand Down
1 change: 1 addition & 0 deletions translations/strings.txt
Expand Up @@ -170,6 +170,7 @@
"Downloading driver {{.driver}}:": "",
"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": "",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
"ERROR creating `registry-creds-acr` secret": "",
"ERROR creating `registry-creds-dpr` secret": "",
Expand Down
1 change: 1 addition & 0 deletions translations/zh-CN.json
Expand Up @@ -217,6 +217,7 @@
"Downloading {{.name}} {{.version}}": "正在下载 {{.name}} {{.version}}",
"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": "",
"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": "",
"Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n For more details see: https://github.com/kubernetes/minikube/issues/16221\n": "",
"Duration until minikube certificate expiration, defaults to three years (26280h).": "",
"ERROR creating `registry-creds-acr` secret": "",
"ERROR creating `registry-creds-dpr` secret": "创建 `registry-creds-dpr` secret 时出错",
Expand Down