-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
hyperv: no External vswitch nor Default Switch found (Get-VMSwitch fails) #5691
Comments
Interesting. Do you mind sharing the output of:
I don't know why it's the case, but it appears that the default network switch for Hyper-V is either unable to be found, or just does not exist. The solution is likely to add a virtual switch in Hyper-V, but it'd be good to get confirmation first. This command may work for doing so:
Thanks! |
PS C:\Windows\system32> Get-VMSwitch
|
@asloan7 - Interesting, and atypical. Do you mind trying to create an external switch to see if minikube works properly with it? |
I had the same issue described above and creating a new virtual switch and instructing minikube to use it solved my problem. |
@JaremPDQ Can you paste the commands to do this? I haven't had success yet |
PS C:\Windows\system32> Get-NetAdapter Name InterfaceDescription ifIndex Status MacAddress LinkSpeed vEthernet (DockerNAT) Hyper-V Virtual Ethernet Adapter 5 Up 00-15-5D-60-12-02 10 Gbps |
@asloan7 Have you tried following the instructions that @tstromberg posted to create an external switch? |
I have tried, might be corporate lock down of being able to do hyper-v stuff |
@asloan7 are you still having this issue with the newest version? |
PS C:\Windows\system32> New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true
|
PS C:\Windows\system32> choco upgrade minikube PS C:\Windows\system32> minikube start --vm-driver=hyperv
|
Did you try to reboot. The default VM switch gets re-created at each reboot. Also look at this post, it seems there is a solution. Potential Fix I was having the same error message just trying to connect to the Hyper-V manager on the localhost and the following steps resolved my issue maybe it will help you:
Also I suggest you look at using internal VM Switch. In my opinion it is a more robust solution than external switch. #5812 #5072 |
@asloan7 do you mind trying to see if @brainfull will comment helps ? |
Looks like that is under Windows Defender, but my laptop is using Symantec Endpoint Protection instead. So I don't have access to those setting, maybe there is a Symantec equivalent. Or in Registry? |
Windows Enterprise does not offer the Default Switch (Windows 10 Home/Pro only) and HyperV support needs to be installed as a Server Role. It might very well be that you have installed just the manegement tools, although the Qualified Not Found might indicate an issue with cmdlets not being located correctly? |
Install the server role and make sure the services is started properly. |
@gbraad if you can provide a few Get-WindowsFeature, Install-WindowsFeature shell commands I can try that would be great |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@asloan7 - do you mind checking with the answer given here: https://superuser.com/questions/1026651/how-to-find-out-whether-hyper-v-is-currently-enabled-running You can check the system log to see if any activity has occurred guide here:
|
@asloan7 Is this still an issue? Did you try connecting to the Hyper-V Manager as an admin? |
I'm going to go ahead and close this issue. Feel free to reopen if needed. |
I had a default VMSwitch that the script didn't detect on its own, and I even made an external one and it didn't get either. PS C:\Windows\System32> Get-VMSwitch
Name SwitchType NetAdapterInterfaceDescription
---- ---------- ------------------------------
Default Switch Internal
ExternalSwitch External Realtek PCIe GbE Family Controller
PS C:\Windows\System32>
I ended up putting the name of the externalswitch: Set-IniFileValue -Path $configFilePath -Section "vm" -Key "external_switch" -Value "ExternalSwitch" You can get the name of your switch with this: $(Get-VMSwitch)[0].Name
# or the second one
$(Get-VMSwitch)[1].Name Not sure why it's not working with an internal switch to be honest. Hope this helps someone out there! |
PS C:\Windows\system32> choco upgra
Chocolatey v0.10.11
Upgrading the following packages:
minikube
You have minikube v0.30.0 installed. Version 1.4.0 is available based on your source(s).
Progress: Downloading Minikube 1.4.0... 100%
Minikube v1.4.0 [Approved]
minikube package files upgrade completed. Performing other installation steps.
ShimGen has successfully created a shim for minikube.exe
The upgrade of minikube was successful.
Software install location not explicitly set, could be in package or
default install location if installer.
Chocolatey upgraded 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Path :
Online : True
RestartNeeded : False
PS C:\Windows\system32> minikube start --vm-driver=hyperv
for this command to run. Check https://docs.docker.com/machine/drivers/hyper-v/
for this command to run. Check https://docs.docker.com/machine/drivers/hyper-v/
for this command to run. Check https://docs.docker.com/machine/drivers/hyper-v/
for this command to run. Check https://docs.docker.com/machine/drivers/hyper-v/
X Unable to start VM: create: precreate: no External vswitch nor Default Switch found. A valid vswitch must be available
for this command to run. Check https://docs.docker.com/machine/drivers/hyper-v/
.\notepad.exe C:\ProgramData\chocolatey\logs\chocolatey.log
(really long, here is the end)
2019-10-22 14:30:19,697 25672 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey.chocolatey\Minikube.1.4.0".
2019-10-22 14:30:19,702 25672 [DEBUG] - There was no original file at 'C:\ProgramData\chocolatey.chocolatey\Minikube.1.4.0.files'
2019-10-22 14:30:19,706 25672 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey.chocolatey\Minikube.1.4.0.extra".
2019-10-22 14:30:19,707 25672 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey.chocolatey\Minikube.1.4.0.version".
2019-10-22 14:30:19,708 25672 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey.chocolatey\Minikube.1.4.0.sxs".
2019-10-22 14:30:19,709 25672 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey.chocolatey\Minikube.1.4.0.pin".
2019-10-22 14:30:19,711 25672 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2019-10-22 14:30:19,713 25672 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\Minikube.chocolateyPending".
2019-10-22 14:30:19,719 25672 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bkp\minikube".
2019-10-22 14:30:19,731 25672 [INFO ] - The upgrade of minikube was successful.
2019-10-22 14:30:19,735 25672 [INFO ] - Software install location not explicitly set, could be in package or
default install location if installer.
2019-10-22 14:30:19,738 25672 [DEBUG] - Attempting to delete file "C:\Users\asloan204\AppData\Local\NuGet\Cache\Minikube.1.4.0.nupkg".
2019-10-22 14:30:19,753 25672 [WARN ] -
Chocolatey upgraded 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2019-10-22 14:30:19,756 25672 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2019-10-22 14:30:19,800 25672 [DEBUG] - Exiting with 0
PS C:\Windows\system32> systeminfo
Host Name: PATAPL-28WMZF2
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.14393 N/A Build 14393
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Workstation
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
Registered Organization:
Product ID: 00329-00000-00003-AA690
Original Install Date: 8/23/2016, 1:05:12 PM
System Boot Time: 10/18/2019, 9:05:23 AM
System Manufacturer: Dell Inc.
System Model: Latitude E5470
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 94 Stepping 3 GenuineIntel ~2701 Mhz
BIOS Version: Dell Inc. 1.18.6, 12/8/2017
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume2
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC-05:00) Eastern Time (US & Canada)
Total Physical Memory: 16,276 MB
Available Physical Memory: 6,984 MB
Virtual Memory: Max Size: 18,708 MB
Virtual Memory: Available: 7,347 MB
Virtual Memory: In Use: 11,361 MB
Page File Location(s): C:\pagefile.sys
Domain: aaa.bbb.com
Logon Server: \PACDCADDCCB13
Hotfix(s): 11 Hotfix(s) Installed.
[01]: KB3176936
[02]: KB3211320
[03]: KB4013418
[04]: KB4023834
[05]: KB4091664
[06]: KB4093137
[07]: KB4132216
[08]: KB4465659
[09]: KB4485447
[10]: KB4493478
[11]: KB4493470
Network Card(s): 4 NIC(s) Installed.
[01]: Intel(R) Ethernet Connection (2) I219-LM
Connection Name: Ethernet
Status: Media disconnected
[02]: Intel(R) Dual Band Wireless-AC 8260
Connection Name: Wi-Fi
DHCP Enabled: Yes
DHCP Server: 69.252.250.82
IP address(es)
[01]: 10.21.178.99
[02]: fe80::454e:834f:cfd8:22af
[03]: 2001:558:1404:e:858f:f8ee:1eb1:ea15
[04]: 2001:558:1404:e:454e:834f:cfd8:22af
[03]: VirtualBox Host-Only Ethernet Adapter
Connection Name: VirtualBox Host-Only Network
DHCP Enabled: No
IP address(es)
[01]: 192.168.56.1
[02]: fe80::6c0b:ebd3:aa32:b2b8
[04]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (DockerNAT)
DHCP Enabled: No
IP address(es)
[01]: 10.0.75.1
[02]: fe80::45d:a1fe:7e42:541e
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
The text was updated successfully, but these errors were encountered: