Skip to content

Fix mounting on QEMU with socket_vmnet #15108

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

Merged
merged 4 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/minikube/cmd/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/reason"
"k8s.io/minikube/pkg/minikube/style"
pkgnetwork "k8s.io/minikube/pkg/network"
"k8s.io/minikube/third_party/go9p/ufs"
)

Expand Down Expand Up @@ -125,6 +126,13 @@ var mountCmd = &cobra.Command{
if co.CP.Host.Driver.DriverName() == driver.None {
exit.Message(reason.Usage, `'none' driver does not support 'minikube mount' command`)
}
if driver.IsQEMU(co.Config.Driver) && pkgnetwork.IsUser(co.Config.Network) {
msg := "minikube mount is not currently implemented with the user network on QEMU"
if runtime.GOOS == "darwin" {
msg += ", try starting minikube with '--network=socket_vmnet'"
}
exit.Message(reason.Unimplemented, msg)
}

var ip net.IP
var err error
Expand Down
9 changes: 3 additions & 6 deletions pkg/minikube/cluster/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ func HostIP(host *host.Host, clusterName string) (net.IP, error) {
if err != nil {
return []byte{}, errors.Wrap(err, "Error getting IP address")
}
// user network case
if ipString == "127.0.0.1" {
// user network case
return net.ParseIP("10.0.2.2"), nil
}
ip := net.ParseIP(ipString).To4()
if ip == nil {
return []byte{}, errors.Wrap(err, "Error converting IP address to IPv4 address")
}
return ip, nil
// socket_vmnet network case
return net.ParseIP("192.168.105.1"), nil
case driver.HyperV:
v := reflect.ValueOf(host.Driver).Elem()
var hypervVirtualSwitch string
Expand Down
1 change: 1 addition & 0 deletions translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "Minikube ist nicht fรผr die Verwendung in Produktion gedacht. Nicht lokaler Traffik wird zugelassen",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "Minikube ist nicht in der Lage auf die Google Container Registry zuzugreifen. Eventuell mรผssen Sie einen HTTP Proxy konfigurieren.",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "Minikube kann nicht zur VM verbinden: {{.error}}\n\n\tDies ist wahrscheinlich aufgrund einem von zwei Grรผnden:\n\n\t- VPN oder Firewall Probleme\n\t- {{.hypervisor}} Netzwerk Konfiguration Issue\n\n\tVorgeschlagene Workarounds:\n\n\t- Deaktiviere die lokale VPN oder Firewall Software\n\t- Konfigure das lokale VPN oder die Firewall so, dass Zugriff auf die IP {{.ip}} erlaubt ist\n\t- Restarte oder Reinstalliere {{.hypervisor}}\n\t- Verwende einen alternativen --vm-dirver\n\t- Verwende --force um die Konnektivitรคts-Prรผfung zu รผberspringen\n\t",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "Minikube Profil wurde erfolgreich gesetzt auf {{.profile_name}}",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "Minikube provisioniert und managed lokale Kubernetes Cluster optimiert fรผr Entwicklungs-Workflows.",
"minikube quickly sets up a local Kubernetes cluster": "Minikube installiert schnell einen lokalen Kubernetes Cluster",
Expand Down
1 change: 1 addition & 0 deletions translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "",
"minikube quickly sets up a local Kubernetes cluster": "",
Expand Down
1 change: 1 addition & 0 deletions translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "minikube n'est pas destinรฉ ร  une utilisation en production. Vous ouvrez du trafic non local",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "minikube ne peut pas accรฉder ร  Google Containerย Registry. Vous devrez peut-รชtre le configurer pour utiliser un proxy HTTP.",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "minikube ne parvient pas ร  se connecter ร  la VMย : {{.error}}\n\n\tCela est probablement dรป ร  l'une des deux raisons suivantesย :\n\n\t- Interfรฉrence VPN ou pare-feu\n\t- {{.hypervisor}} problรจme de configuration rรฉseau\n\n\tSolutions suggรฉrรฉesย :\n\n\t- Dรฉsactivez votre logiciel VPN ou pare-feu local\n\t- Configurez votre VPN ou pare-feu local pour autoriser l'accรจs ร  {{.ip}}\n \t- Redรฉmarrez ou rรฉinstallez {{.hypervisor}}\n\t- Utilisez un autre --vm-driver\n\t- Utilisez --force pour annuler cette vรฉrification de connectivitรฉ\n\t",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "Le profil de minikube a รฉtรฉ dรฉfini avec succรจs sur {{.profile_name}}",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "minikube provisionne et gรจre des clusters Kubernetes locaux optimisรฉs pour les workflows de dรฉveloppement.",
"minikube quickly sets up a local Kubernetes cluster": "minikube configure rapidement un cluster Kubernetes local",
Expand Down
1 change: 1 addition & 0 deletions translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "minikube ใฏๆœฌ็•ช้ฉ็”จใ‚’ๆ„ๅ›ณใ•ใ‚ŒใŸใ‚‚ใฎใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ใ‚ใชใŸใฏ้žใƒญใƒผใ‚ซใƒซใฎใƒˆใƒฉใƒ•ใ‚ฃใƒƒใ‚ฏใ‚’้–‹ใ“ใ†ใจใ—ใฆใ„ใพใ™",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "minikube ใŒ Google Container Registry ใซๆŽฅ็ถšใงใใพใ›ใ‚“ใ€‚ HTTP ใƒ—ใƒญใ‚ญใ‚ทใƒผใ‚’ไฝฟ็”จใ™ใ‚‹ใ‚ˆใ†ใซ่จญๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใ‹ใ‚‚ใ—ใ‚Œใพใ›ใ‚“ใ€‚",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "minikube ใŒ VM ใซๆŽฅ็ถšใงใใพใ›ใ‚“: {{.error}}\n\n\t่€ƒใˆใ‚‰ใ‚Œใ‚‹็†็”ฑใฏไปฅไธ‹ใฎ 2 ใคใงใ™:\n\n\t- VPN ใพใŸใฏใƒ•ใ‚กใ‚คใ‚ขใ‚ฆใ‚ฉใƒผใƒซใซใ‚ˆใ‚‹ๅนฒๆธ‰\n\t- {{.hypervisor}} ใฎใƒใƒƒใƒˆใƒฏใƒผใ‚ฏ่จญๅฎšใฎๅ•้กŒ\n\n\tๅ›ž้ฟ็ญ–ใซใฏไปฅไธ‹ใŒใ‚ใ‚Šใพใ™:\n\n\t- ใƒญใƒผใ‚ซใƒซใฎ VPN ใพใŸใฏใƒ•ใ‚กใ‚คใ‚ขใ‚ฆใ‚ฉใƒผใƒซใ‚’็„กๅŠนๅŒ–\n\t- {{.ip}} ใธใฎใ‚ขใ‚ฏใ‚ปใ‚นใ‚’่จฑๅฏใ™ใ‚‹ใ‚ˆใ†ใซใƒญใƒผใ‚ซใƒซใฎ VPN ใพใŸใฏใƒ•ใ‚กใ‚คใ‚ขใ‚ฆใ‚ฉใƒผใƒซใ‚’่จญๅฎš\n\t- {{.hypervisor}} ใ‚’ๅ†่ตทๅ‹•ใพใŸใฏๅ†ใ‚คใƒณใ‚นใƒˆใƒผใƒซ\n\t- ไปฃใ‚ใ‚Šใฎ --vm-driver ใ‚’ไฝฟ็”จ\n\t- --force ใ‚’ไฝฟ็”จใ—ใฆใ“ใฎๆŽฅ็ถšใƒใ‚งใƒƒใ‚ฏใ‚’ไธŠๆ›ธใ\n\t",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "็„กไบ‹ minikube ใฎใƒ—ใƒญใƒ•ใ‚กใ‚คใƒซใŒ {{.profile_name}} ใซ่จญๅฎšใ•ใ‚Œใพใ—ใŸ",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "minikube ใฏใ€้–‹็™บใƒฏใƒผใ‚ฏใƒ•ใƒญใƒผ็”จใซๆœ€้ฉๅŒ–ใ•ใ‚ŒใŸใƒญใƒผใ‚ซใƒซ Kubernetes ใ‚ฏใƒฉใ‚นใ‚ฟใƒผใ‚’ๆง‹็ฏ‰ใƒป็ฎก็†ใ—ใพใ™ใ€‚",
"minikube quickly sets up a local Kubernetes cluster": "minikube ใฏใƒญใƒผใ‚ซใƒซ Kubernetes ใ‚ฏใƒฉใ‚นใ‚ฟใƒผใ‚’่ฟ…้€Ÿใซใ‚ปใƒƒใƒˆใ‚ขใƒƒใƒ—ใ—ใพใ™",
Expand Down
1 change: 1 addition & 0 deletions translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "minikube๋Š” ๊ฐœ๋ฐœ ์›Œํฌํ”Œ๋กœ์šฐ์— ์ตœ์ ํ™”๋œ ๋กœ์ปฌ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋ฅผ ์ œ๊ณตํ•˜๊ณ  ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.",
"minikube quickly sets up a local Kubernetes cluster": "",
Expand Down
1 change: 1 addition & 0 deletions translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "minikube nie jest przeznaczony do uลผycia w ล›rodowisku produkcyjnym. Otwierasz klaster na ruch nielokalny",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "uzyskanie dostฤ™pu do Google Container Registry poprzez minikube nie powiodล‚o siฤ™. Moลผliwe, ลผe musisz skonfigurowaฤ‡ ustawienia proxy HTTP w minikube",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "profil minikube zostaล‚ z powodzeniem zmieniony na: {{.profile_name}}",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "minikube dostarcza lokalne klastry Kubernetesa zoptymalizowane do celรณw rozwoju oprogramowania oraz zarzฤ…dza nimi",
"minikube quickly sets up a local Kubernetes cluster": "minikube szybko inicjalizuje lokalny klaster Kubernetesa",
Expand Down
1 change: 1 addition & 0 deletions translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "",
"minikube quickly sets up a local Kubernetes cluster": "",
Expand Down
1 change: 1 addition & 0 deletions translations/strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@
"minikube is not meant for production use. You are opening non-local traffic": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "",
"minikube quickly sets up a local Kubernetes cluster": "",
Expand Down
1 change: 1 addition & 0 deletions translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check\n\t": "",
"minikube is unable to connect to the VM: {{.error}}\n\nThis is likely due to one of two reasons:\n\n- VPN or firewall interference\n- {{.hypervisor}} network configuration issue\n\nSuggested workarounds:\n\n- Disable your local VPN or firewall software\n- Configure your local VPN or firewall to allow access to {{.ip}}\n- Restart or reinstall {{.hypervisor}}\n- Use an alternative --vm-driver": "minikube ๆ— ๆณ•่ฟžๆŽฅๅˆฐ่™šๆ‹Ÿๆœบ๏ผš{{.error}}\n\nๅฏ่ƒฝๆ˜ฏ็”ฑไบŽไปฅไธ‹ไธคไธชๅŽŸๅ› ไน‹ไธ€ๅฏผ่‡ด๏ผš\n\n-VPN ๆˆ–้˜ฒ็ซๅข™ๅ†ฒ็ช\n- {{.hypervisor}} ็ฝ‘็ปœ้…็ฝฎ้—ฎ้ข˜\nๅปบ่ฎฎ็š„ๆ–นๆกˆ๏ผš\n\n- ็ฆ็”จๆœฌๅœฐ็š„ VPN ๆˆ–่€…้˜ฒ็ซๅข™่ฝฏไปถ\n- ้…็ฝฎๆœฌๅœฐ VPN ๆˆ–้˜ฒ็ซๅข™่ฝฏไปถ๏ผŒๆ”พ่กŒ {{.ip}}\n- ้‡ๅฏๆˆ–่€…้‡่ฃ… {{.hypervisor}}\n- ไฝฟ็”จๅฆๅค–็š„ --vm-driver",
"minikube mount is not currently implemented with the user network on QEMU": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube provisions and manages local Kubernetes clusters optimized for development workflows.": "",
"minikube quickly sets up a local Kubernetes cluster": "",
Expand Down