Minikube hanging on Creating hyperv VM Minikube hanging on Creating hyperv VM kubernetes kubernetes

Minikube hanging on Creating hyperv VM


According to the tutorial you followed you have to make a new virtual network switch in the Hyper-V Manager with the type External. The author does not explain why the network switch has to be external, other than that this configuration is best for avoiding headaches with Minikube not working properly with other software.

For some reason the External type of the virtual network switch was the problem, instead of External type use the Internal type for your virtual network switch in the Hyper-V Manager. Then run the following command to delete the wrong configurated cluster and to clean up:

minikube delete

Now, re-run the create/launch command for your Minikube cluster with your internal virtual network switch:

minikube start --vm-driver hyperv --hyperv-virtual-switch "Your Internal Virtual Switch"

Now you're all set with your new cluster when it finishes correctly!


Fix On Azure VM in Windows Server 2019:

  1. Check if minikube VM has an IP Address in Networking tab

    • If NO IP address and no DHCP is running in VM, then go to next step
  2. Create new InternalNAT switch:

Powershell:

New-VMSwitch -Name "InternalNAT" -SwitchType Internal Get-NetAdapter# Take note of the "ifIndex" for the virtual switch you just created, assuming 13New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex 13New-NetNat -Name "InternalNat" -InternalIPInterfaceAddressPrefix 192.168.0.0/24
  1. Create DHCP Server
  • Create new scope for 192.168.. (or any range, note down this range)
  1. Delete and Re-create minikube and use "InternalNat" switch
minikube start --vm-driver hyperv --hyperv-virtual-switch "InternalNAT"