minikube: minikube start with hyper-v won't resolve guest ip-address
BUG REPORT
Executing minikube start --vm-driver="hyperv" --hyperv-virtual-switch="ext1", where ext1 is my external virtual switch on hyper-v, the system hangs on “Starting VM” message.
Checking the log it seems that the powershell command used to retireve the ip address of the guest machine don’t returns any value (i tested running the command on a separate powershell with the same result).
I obtained the same result on two different machines.
Environment:
Minikube version: v0.22.0
- OS: Windows 10x64 - 1703
- VM Driver: hyper-v
- ISO version: -v0.23.3
- Install tools: kubectl & minikube installed using chocolatey packages
Output of minikube logs:
[executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM minikube ).networkadapters[0]).ipaddresses[0]
[stdout =====>] :
[stderr =====>] :
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 28
I had this same trouble on my machine. After some troubleshooting and head banging, it became apparent that the external network adapter had an ethernet adapter selected that was not connected to a network. (ethernet selected, instead of the wireless adapter). Of course an IP wont be allocated on an external network if none is connected.
Once the connected wireless adapter was selected (an adapter actually connected to a DHCP network), all was good. While rather silly on the end, I hope this helps someone with the same “IP loop” issue
Hung on:
[executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM minikube ).networkadapters[0]).ipaddresses[0][stdout =====>] :[stderr =====>] :Works for me when changed:
minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"to:minikube start --vm-driver hyperv --hyperv-virtual-switch "Default Switch"Also running into this issue.
Minikube version v0.25.0
I get these logs by running this command:
W0317 23:56:24.407104 12708 root.go:148] Error reading config file at C:\Program Files\Docker\Minikube.minikube\config\config.json: open C:\Program Files\Docker\Minikube.minikube\config\config.json: The system cannot find the file specified. I0317 23:56:24.409605 12708 notify.go:109] Checking for updates… I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: gcr.io/k8s-minikube/storage-provisioner:v1.8.0 at C:\Program Files\Docker\Minikube.minikube\cache\images\gcr.io\k8s-minikube\storage-provisioner_v1.8.0 Starting local Kubernetes v1.9.0 cluster… Starting VM… I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.5 at C:\Program Files\Docker\Minikube.minikube\cache\images\k8s.gcr.io\k8s-dns-dnsmasq-nanny-amd64_1.14.5 I0317 23:56:24.677587 12708 cluster.go:70] Machine does not exist… provisioning new machine I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: gcr.io/google-containers/kube-addon-manager:v6.5 at C:\Program Files\Docker\Minikube.minikube\cache\images\gcr.io\google-containers\kube-addon-manager_v6.5 I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: k8s.gcr.io/pause-amd64:3.0 at C:\Program Files\Docker\Minikube.minikube\cache\images\k8s.gcr.io\pause-amd64_3.0 I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1 at C:\Program Files\Docker\Minikube.minikube\cache\images\k8s.gcr.io\kubernetes-dashboard-amd64_v1.8.1 I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.5 at C:\Program Files\Docker\Minikube.minikube\cache\images\k8s.gcr.io\k8s-dns-kube-dns-amd64_1.14.5 I0317 23:56:24.676586 12708 cache_images.go:292] Attempting to cache image: k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.5 at C:\Program Files\Docker\Minikube.minikube\cache\images\k8s.gcr.io\k8s-dns-sidecar-amd64_1.14.5 I0317 23:56:24.677587 12708 cluster.go:71] Provisioning machine with config: {MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v0.25.1.iso Memory:4096 CPUs:4 DiskSize:20000 VMDriver:hyperv XhyveDiskDriver:ahci-hd DockerEnv:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch:New Virtual Switch KvmNetwork:default Downloader:{} DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID:} I0317 23:56:24.678586 12708 cache_images.go:79] Successfully cached all images. I0317 23:56:24.678586 12708 downloader.go:56] Not caching ISO, using https://storage.googleapis.com/minikube/iso/minik ube-v0.25.1.iso [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @(Get-Command Get -VM).ModuleName [stdout =====>] : Hyper-V
[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(“S-1-5-32-578”) [stdout =====>] : False
[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”) [stdout =====>] : True
[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (Get-VMSwitch).Name [stdout =====>] : DockerNAT Default Switch New Virtual Switch
[stderr =====>] : Downloading C:\Program Files\Docker\Minikube.minikube\cache\boot2docker.iso from file://C:/Program Files/Docker/Minikube/.minikube/cache/iso/minikube-v0.25.1.iso… Creating SSH key… Creating VM… [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (Get-VMSwitch).Name [stdout =====>] : DockerNAT Default Switch New Virtual Switch
[stderr =====>] : Using switch “New Virtual Switch” [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Princ ipal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRol e] “Administrator”) [stdout =====>] : True
[stderr =====>] : Creating VHD [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive New-VHD -Path ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube\fixed.vhd’ -SizeBytes 10MB -Fixed [stdout =====>] :
ComputerName : DESKTOP-9SMC76M Path : C:\Program Files\Docker\Minikube.minikube\machines\minikube\fixed.vhd VhdFormat : VHD VhdType : Fixed FileSize : 10486272 Size : 10485760 MinimumSize : LogicalSectorSize : 512 PhysicalSectorSize : 512 BlockSize : 0 ParentPath : DiskIdentifier : C7A2C5E7-513F-4E09-B2C3-94EDE15E8413 FragmentationPercentage : 0 Alignment : 1 Attached : False DiskNumber : IsPMEMCompatible : False AddressAbstractionType : None Number :
[stderr =====>] : Writing magic tar header Writing SSH key tar header [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Convert-VHD -Path ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube\fixed.vhd’ -DestinationPath ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube\disk.vhd’ -VHDType Dynamic -DeleteSource [stdout =====>] : [stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Resize-VHD -Path ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube\disk.vhd’ -SizeBytes 20000MB [stdout =====>] : [stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive New-VM minikube -Path ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube’ -SwitchName ‘New Virtual Switch’ -MemoryStartupBytes 4096MB [stdout =====>] : Name State CPUUsage(%) MemoryAssigned(M) Uptime Status Version
minikube Off 0 0 00:00:00 Operating normally 8.2
[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Set-VMProcessor minikube -Count 4 [stdout =====>] : [stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Set-VMDvdDrive -VMName minikube -Path ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube\boot2docker.iso’ [stdout =====>] : [stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Add-VMHardDiskDrive -VMName minikube -Path ‘C:\Program Files\Docker\Minikube.minikube\machines\minikube\disk.vhd’ [stdout =====>] : [stderr =====>] : Starting VM… [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Start-VM minikube [stdout =====>] : [stderr =====>] : Waiting for host to start… [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM minikube ).state [stdout =====>] : Running
[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM minikube ).networkadapters[0]).ipaddresses[0] [stdout =====>] : [stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM minikube ).state [stdout =====>] : Running
[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM minikube ).networkadapters[0]).ipaddresses[0] [stdout =====>] : [stderr =====>] :
Same issue on:
Windows 10 Pro Minikube v0.30.0
I am facing the error too on a Windows 10 Pro machine. I have the same log output like @cforce. I tested with 0.24.1, 0.22.2, and 0.19.1. In addition, I checked whether /usr/sbin/hv_kvp_daemon is running (as suggested by @mikemcgo). It is running.
The first mention of this bug/behaviour re-appearing was 2018-01-05 - over a month after 0.24.1 was released. This could be an indicator that a Windows Update or similar triggered this.