Minikube: hypervAvailable: panic: runtime error: index out of range [0] with length 0

Created on 2 Jul 2018  Â·  18Comments  Â·  Source: kubernetes/minikube

I am unable to start minikube on windows 10.

Please provide the following details:

Environment:

Minikube version (use minikube version): v0.25.2

  • OS (e.g. from /etc/os-release): windows 10
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): hyper-v
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.25.1.iso
  • Install tools:
  • Others:

What happened: minikube is unable to start on windows 10.

What you expected to happen: minikube should be able to create vm and create a cluster.

How to reproduce it (as minimally and precisely as possible):
minikube start --vm-driver hyperv --hyperv-virtual-switch "mini" --alsologtostderr -v 9999

Output of minikube logs (if applicable):

I0702 13:00:36.012545 6380 start.go:96] Viper configuration:
Aliases:
map[string]string{}
Override:
map[string]interface {}{"v":"9999", "alsologtostderr":"true"}
PFlags:
map[string]viper.FlagValue{"apiserver-ips":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa140)}, "apiserver-name":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa000)}, "container-runtime":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa460)}, "registry-mirror":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa320)}, "vm-driver":viper.pflagValue{flag:(pflag.Flag)(0xc042617860)}, "mount":viper.pflagValue{flag:(pflag.Flag)(0xc0426175e0)}, "cache-images":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa640)}, "feature-gates":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa5a0)}, "host-only-cidr":viper.pflagValue{flag:(pflag.Flag)(0xc042617ae0)}, "kvm-network":viper.pflagValue{flag:(pflag.Flag)(0xc042617c20)}, "iso-url":viper.pflagValue{flag:(pflag.Flag)(0xc0426177c0)}, "nfs-share":viper.pflagValue{flag:(pflag.Flag)(0xc042617d60)}, "nfs-shares-root":viper.pflagValue{flag:(pflag.Flag)(0xc042617e00)}, "profile":viper.pflagValue{flag:(pflag.Flag)(0xc042616b40)}, "disable-driver-mounts":viper.pflagValue{flag:(pflag.Flag)(0xc042617720)}, "docker-opt":viper.pflagValue{flag:(pflag.Flag)(0xc042617f40)}, "insecure-registry":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa280)}, "mount-string":viper.pflagValue{flag:(pflag.Flag)(0xc042617680)}, "xhyve-disk-driver":viper.pflagValue{flag:(pflag.Flag)(0xc042617cc0)}, "apiserver-names":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa0a0)}, "disk-size":viper.pflagValue{flag:(pflag.Flag)(0xc042617a40)}, "dns-domain":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa1e0)}, "keep-context":viper.pflagValue{flag:(pflag.Flag)(0xc042617540)}, "memory":viper.pflagValue{flag:(pflag.Flag)(0xc042617900)}, "docker-env":viper.pflagValue{flag:(pflag.Flag)(0xc042617ea0)}, "extra-config":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa6e0)}, "kubernetes-version":viper.pflagValue{flag:(pflag.Flag)(0xc0425fa3c0)}, "bootstrapper":viper.pflagValue{flag:(pflag.Flag)(0xc042616be0)}, "cpus":viper.pflagValue{flag:(pflag.Flag)(0xc0426179a0)}, "hyperv-virtual-switch":viper.pflagValue{flag:(pflag.Flag)(0xc042617b80)}, "network-plugin":viper.pflagValue{flag:(*pflag.Flag)(0xc0425fa500)}}
Env:
map[string]string{}
Key/Value Store:
map[string]interface {}{}
Config:
map[string]interface {}{}
Defaults:
map[string]interface {}{"reminderwaitperiodinhours":24, "wantreporterror":false, "wantkubectldownloadmsg":true, "wantnonedriverwarning":true, "v":"0", "wantupdatenotification":true, "showdriverdeprecationnotification":true, "alsologtostderr":"false", "log_dir":"", "wantreporterrorprompt":true}
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: gcr.io/k8s-minikube/storage-provisioner:v1.8.0 at C:\Users\dekumar.minikube\cache\images\gcr.io\k8s-minikube\storage-provisioner_v1.8.0
Starting local Kubernetes v1.9.4 cluster...
Starting VM...
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.5 at C:\Users\dekumar.minikube\cache\images\k8s.gcr.io\k8s-dns-dnsmasq-nanny-amd64_1.14.5
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: gcr.io/google-containers/kube-addon-manager:v6.5 at C:\Users\dekumar.minikube\cache\images\gcr.io\google-containers\kube-addon-manager_v6.5
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1 at C:\Users\dekumar.minikube\cache\images\k8s.gcr.io\kubernetes-dashboard-amd64_v1.8.1
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.5 at C:\Users\dekumar.minikube\cache\images\k8s.gcr.io\k8s-dns-sidecar-amd64_1.14.5
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.5 at C:\Users\dekumar.minikube\cache\images\k8s.gcr.io\k8s-dns-kube-dns-amd64_1.14.5
I0702 13:00:36.015518 6380 cache_images.go:292] Attempting to cache image: k8s.gcr.io/pause-amd64:3.0 at C:\Users\dekumar.minikube\cache\images\k8s.gcr.io\pause-amd64_3.0
I0702 13:00:36.016537 6380 cluster.go:70] Machine does not exist... provisioning new machine
I0702 13:00:36.023535 6380 cache_images.go:79] Successfully cached all images.
I0702 13:00:36.023535 6380 cluster.go:71] Provisioning machine with config: {MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v0.25.1.iso Memory:2048 CPUs:2 DiskSize:20000 VMDriver:hyperv XhyveDiskDriver:ahci-hd DockerEnv:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch:mini KvmNetwork:default Downloader:{} DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID:}
I0702 13:00:36.028542 6380 downloader.go:56] Not caching ISO, using https://storage.googleapis.com/minikube/iso/minikube-v0.25.1.iso
Reading certificate data from C:\Users\dekumar.minikube\certs\ca.pem
Decoding PEM data...
Parsing certificate...
Reading certificate data from C:\Users\dekumar.minikube\certs\cert.pem
Decoding PEM data...
Parsing certificate...
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @(Get-Module -ListAvailable hyper-v).Name | Get-Unique
[stdout =====>] :
[stderr =====>] :
panic: runtime error: index out of range

goroutine 1 [running]:
k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv.hypervAvailable(0xc0424ae0f0, 0xc0000000cb)
/go/src/k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv/powershell.go:64 +0x11b
k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv.(Driver).PreCreateCheck(0xc0423a2240, 0x0, 0x0)
/go/src/k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv/hyperv.go:159 +0x3d
k8s.io/minikube/vendor/github.com/docker/machine/libmachine/drivers.(Driver).PreCreateCheck-fm(0x0, 0x0)
/go/src/k8s.io/minikube/pkg/minikube/machine/client.go:192 +0x39
k8s.io/minikube/pkg/minikube/machine.(
LocalClient).Create(0xc0420561c0, 0xc0423a22a0, 0x0, 0x0)
/go/src/k8s.io/minikube/pkg/minikube/machine/client.go:226 +0x314
k8s.io/minikube/pkg/minikube/cluster.createHost(0x1dd2600, 0xc0420561c0, 0xc0424700c0, 0x40, 0x800, 0x2, 0x4e20, 0xc0420100e8, 0x6, 0x14eef8f, ...)
/go/src/k8s.io/minikube/pkg/minikube/cluster/cluster.go:252 +0x519
k8s.io/minikube/pkg/minikube/cluster.StartHost(0x1dd2600, 0xc0420561c0, 0xc0424700c0, 0x40, 0x800, 0x2, 0x4e20, 0xc0420100e8, 0x6, 0x14eef8f, ...)
/go/src/k8s.io/minikube/pkg/minikube/cluster/cluster.go:72 +0x6e0
k8s.io/minikube/cmd/minikube/cmd.runStart.func1(0xf, 0x1e69ce0)
/go/src/k8s.io/minikube/cmd/minikube/cmd/start.go:157 +0x83
k8s.io/minikube/pkg/util.RetryAfter(0x5, 0xc042244c00, 0x77359400, 0xf, 0x0)
/go/src/k8s.io/minikube/pkg/util/utils.go:101 +0x83
k8s.io/minikube/cmd/minikube/cmd.runStart(0x1e539a0, 0xc042602150, 0x0, 0x7)
/go/src/k8s.io/minikube/cmd/minikube/cmd/start.go:163 +0xa04
k8s.io/minikube/vendor/github.com/spf13/cobra.(Command).execute(0x1e539a0, 0xc042615f80, 0x7, 0x7, 0x1e539a0, 0xc042615f80)
/go/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:603 +0x23b
k8s.io/minikube/vendor/github.com/spf13/cobra.(
Command).ExecuteC(0x1e52f00, 0x0, 0x1e89800, 0xc04256df30)
/go/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:689 +0x305
k8s.io/minikube/vendor/github.com/spf13/cobra.(*Command).Execute(0x1e52f00, 0x0, 0x0)
/go/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:648 +0x32
k8s.io/minikube/cmd/minikube/cmd.Execute()
/go/src/k8s.io/minikube/cmd/minikube/cmd/root.go:105 +0x34
main.main()
/go/src/k8s.io/minikube/cmd/minikube/main.go:41 +0xa0
Anything else do we need to know:
after noticing the logs as highlighted i ran the shell commands as below

PS C:\WINDOWS\system32> Get-Module -ListAvailable hyper-v

Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 2.0.0.0 Hyper-V {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMGpuPartitionAdapter...}
Binary 1.1 Hyper-V {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDrive, Add-VMMigrationNetwork...}

PS C:\WINDOWS\system32> (Get-Module -ListAvailable hyper-v).Name | Get-Unique
Hyper-V
PS C:\WINDOWS\system32>

chyperv kinbug owindows prioritimportant-soon

Most helpful comment

I might be a little late or this may be unrelated, but I had the same output and after deleting the folder .minikube from my home directory and reran minikube start, this resolved my issues with hyperv.

All 18 comments

Version 0.28 works on my Windows 10:

minikube start --vm-driver=hyperv --kubernetes-version="v1.10.5" --hyperv-virtual-switch="Default Switch" --memory=3072

I am facing exactly same issue on windows 10 with minikube 0.28.1

Yep, same deal with Windows 10, 0.28.2

C:\windows\system32>minikube start --vm-driver hyperv
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
panic: runtime error: index out of range

goroutine 1 [running]:
k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv.hypervAvailable(0xc0421c2390, 0x6)
/go/src/k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv/powershell.go:64 +0x11b
k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv.(Driver).PreCreateCheck(0xc0421b7a40, 0x0, 0x0)
/go/src/k8s.io/minikube/vendor/github.com/docker/machine/drivers/hyperv/hyperv.go:159 +0x3d
k8s.io/minikube/vendor/github.com/docker/machine/libmachine/drivers.(Driver).PreCreateCheck-fm(0x0, 0x0)
/go/src/k8s.io/minikube/pkg/minikube/machine/client.go:174 +0x39
k8s.io/minikube/pkg/minikube/machine.(
LocalClient).Create(0xc04203b480, 0xc0421b7aa0, 0x0, 0x0)
/go/src/k8s.io/minikube/pkg/minikube/machine/client.go:208 +0x3f4
k8s.io/minikube/pkg/minikube/cluster.createHost(0x1c47360, 0xc04203b480, 0xc042077840, 0x40, 0x800, 0x2, 0x4e20, 0xc0420520c0, 0x6, 0x0, ...)
/go/src/k8s.io/minikube/pkg/minikube/cluster/cluster.go:240 +0x602
k8s.io/minikube/pkg/minikube/cluster.StartHost(0x1c47360, 0xc04203b480, 0xc042077840, 0x40, 0x800, 0x2, 0x4e20, 0xc0420520c0, 0x6, 0x0, ...)
/go/src/k8s.io/minikube/pkg/minikube/cluster/cluster.go:71 +0x6e0
k8s.io/minikube/cmd/minikube/cmd.runStart.func2(0xf, 0xc042006700)
/go/src/k8s.io/minikube/cmd/minikube/cmd/start.go:172 +0x83
k8s.io/minikube/pkg/util.RetryAfter(0x5, 0xc0421b3140, 0x77359400, 0xf, 0x0)
/go/src/k8s.io/minikube/pkg/util/utils.go:105 +0x83
k8s.io/minikube/cmd/minikube/cmd.runStart(0x1ca2b60, 0xc042002500, 0x0, 0x2)
/go/src/k8s.io/minikube/cmd/minikube/cmd/start.go:178 +0xb4f
k8s.io/minikube/vendor/github.com/spf13/cobra.(Command).execute(0x1ca2b60, 0xc0420024c0, 0x2, 0x2, 0x1ca2b60, 0xc0420024c0)
/go/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:757 +0x2c8
k8s.io/minikube/vendor/github.com/spf13/cobra.(
Command).ExecuteC(0x1ca1f80, 0x0, 0x1cd4000, 0xc042393f30)
/go/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:843 +0x33b
k8s.io/minikube/vendor/github.com/spf13/cobra.(*Command).Execute(0x1ca1f80, 0x0, 0x0)
/go/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:791 +0x32
k8s.io/minikube/cmd/minikube/cmd.Execute()
/go/src/k8s.io/minikube/cmd/minikube/cmd/root.go:105 +0x34
main.main()
/go/src/k8s.io/minikube/cmd/minikube/main.go:41 +0xa0

I suspect in my case.. what minikube meant to say was. "HyperV Not found"
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Should resolve it..

I get the some error when running in user mode, but from powershell running with Admin rights, it goes a little further (I see the minikube VM in Hyper-V Manager with state Running) but in the shell it's stuck at:
minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
Starting local Kubernetes v1.10.0 cluster...
Starting VM...

All attempts to connect to minikube fail miserably:
minikube ip
E0913 16:11:18.749899 30668 ip.go:48] Error getting IP: Host is not running

minikube logs
F0913 16:11:50.364160 27064 logs.go:50] Error getting cluster bootstrapper: getting kubeadm bootstrapper: getting ssh client: Error creating new ssh host from driver: Error getting ssh host name for driver: Host is not running

minikube ssh
E0913 16:12:09.955331 24408 ssh.go:53] Error attempting to ssh/run-ssh-command: Error: Cannot run ssh command: Host "minikube" is not running

Thanks @DuaneNielsen

Executing the following steps worked for me:

  1. Open PowerShell as Adminstrator
  2. Run: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
  3. Reboot machine
  4. Run: minikube start --vm-driver "hyperv" --hyperv-virtual-switch "Minikube"

Please note that after fixing this issue, I ran into the following problem:

This appears to be a bug with the upstream HyperV machine driver not knowing how to handle HyperV being unavailable. :(

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

This is not working for me either....after running: minikube start --vm-driver "hyperv" --hyperv-virtual-switch "Minikube"

it says "Minikube" not found.

Sorry that minikube crashed."

I might be a little late or this may be unrelated, but I had the same output and after deleting the folder .minikube from my home directory and reran minikube start, this resolved my issues with hyperv.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/close

On Wed, Sep 18, 2019, at 11:44 PM, fejta-bot wrote:

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta
https://github.com/fejta.
/lifecycle stale

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/minikube/issues/2954?email_source=notifications&email_token=AIUISTII4RXCUUTWNUIMT5DQKMNVVA5CNFSM4FH4O2Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7CM2ZA#issuecomment-532991332, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUISTLIZTDF2OEK5RCYAL3QKMNVVANCNFSM4FH4O2YQ.

@timothydlister: Closing this issue.

In response to this:

/close

On Wed, Sep 18, 2019, at 11:44 PM, fejta-bot wrote:

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta
https://github.com/fejta.
/lifecycle stale

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/minikube/issues/2954?email_source=notifications&email_token=AIUISTII4RXCUUTWNUIMT5DQKMNVVA5CNFSM4FH4O2Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7CM2ZA#issuecomment-532991332, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUISTLIZTDF2OEK5RCYAL3QKMNVVANCNFSM4FH4O2YQ.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

I have removed .minikube folder and ran minikube start.
Command completed but not able to see minikube machine in virtualbox.

below is output.

! minikube v1.9.2 on Microsoft Windows 10 Home Single Language 10.0.18362 Build 18362

  • Automatically selected the hyperv driver
  • Downloading VM boot image ...

minikube-v1.9.0.iso.sha256: 65 B / 65 B [--------------] 100.00% ? p/s 1s
minikube-v1.9.0.iso: 174.93 MiB / 174.93 MiB 100.00% 807.90 KiB p/s 3m42

  • Starting control plane node m01 in cluster minikube
  • Creating hyperv VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
    panic: runtime error: index out of range [0] with length 0

goroutine 60 [running]:
github.com/docker/machine/drivers/hyperv.hypervAvailable(0xc0005eced0, 0xc000706ab0)
/go/pkg/mod/github.com/machine-drivers/[email protected]/drivers/hyperv/powershell.go:64 +0x105
github.com/docker/machine/drivers/hyperv.(Driver).PreCreateCheck(0xc00025e480, 0x0, 0x0)
/go/pkg/mod/github.com/machine-drivers/[email protected]/drivers/hyperv/hyperv.go:171 +0x3b
k8s.io/minikube/pkg/minikube/machine.(
LocalClient).Create(0xc000734100, 0xc00025e4e0, 0x0, 0x0)
/app/pkg/minikube/machine/client.go:229 +0x3f5
k8s.io/minikube/pkg/minikube/machine.timedCreateHost.func2(0x1e08b00, 0xc000734100, 0xc00025e4e0, 0xc00020daa0, 0xc0006e10a0)
/app/pkg/minikube/machine/start.go:170 +0x42
created by k8s.io/minikube/pkg/minikube/machine.timedCreateHost
/app/pkg/minikube/machine/start.go:169 +0x10e

I have this exact same issue. I do have Hyper V installed. I have docker running. You can see the ouput of my Get-Module command below.
| ModuleType Version | Name | ExportedCommands | | |
|--------------------|---------|---------------------------------|---------------------------------------------------------------|---|
| ---------- ------- | ---- | ---------------- | | |
| Script | 0.0 | chocolateyProfile | {TabExpansion, Update-SessionEnvironment, refreshenv} | |
| Binary | 2.0.0.0 | Hyper-V | {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChanne... | |
| Manifest | 3.1.0.0 | Microsoft.PowerShell.Management | {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con... | |
| Manifest | 3.1.0.0 | Microsoft.PowerShell.Utility | {Add-Member, Add-Type, Clear-Variable, Compare-Object...} | |
| Script | 2.0.412 | oh-my-posh | {Get-ComputerName, Get-FormattedRootLocation, Get-FullPath... | |
| Script | 0.7.3.1 | posh-git | {Add-PoshGitToProfile, Add-SshKey, Enable-GitColors, Expan... | |
| Script | 0.7.3 | posh-git | | |
| Script | 2.0.0 | PSReadline | {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS... | |

However, this command returns an empty list:
(Get-Module -ListAvailable hyper-v).Name | Get-Unique

That command is the last command executed by docker before it crashes. You can see my full output log in issue #8248

Once I had conformation that the PS command was the root cause, and I knew Hyper-V was installed, I investigated my powershell environment. For some reason, my Powershell environment variable was messed up:

C:\WINDOWS\system32> $env:PSModulePath
C:\Users\marcusm\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules\;System.String[]

That system.String[] is obviously a fail on some installer. A little research showed me where the Hyper-V Module is installed, and I updated my PSModulesPath system environment variable adding the missing path: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

I restarted my powershell shell and minikube works just fine now. Hopefully this will help others.

I've been getting this consistently on version 1.10, if you re-run the command again it starts perfectly.

Stacktrace:

k8s.io/minikube/pkg/minikube/cluster.HostIP(0xc00048c420, 0x7, 0x1e7e200, 0xc000667860, 0x0, 0xc000572960)
        /app/pkg/minikube/cluster/ip.go:45 +0xce8
k8s.io/minikube/pkg/minikube/node.Start(0x1e3a7e0, 0xc000583020, 0x0, 0x1e65d80, 0xc000230ac0, 0xc00048c420, 0xc00045b880, 0xc000076980, 0xc000404480, 0x4e01, ...)
        /app/pkg/minikube/node/start.go:93 +0x201
k8s.io/minikube/cmd/minikube/cmd.startWithDriver(0x1e3a7e0, 0xc000583020, 0x0, 0x1e65d80, 0xc000230ac0, 0xc00048c420, 0xc00045b880, 0xc000076980, 0xc000404480, 0xc00045a700, ...)
        /app/cmd/minikube/cmd/start.go:281 +0x83
k8s.io/minikube/cmd/minikube/cmd.runStart(0x2b53760, 0xc000140cc0, 0x0, 0x2)
        /app/cmd/minikube/cmd/start.go:202 +0x6f3
github.com/spf13/cobra.(*Command).execute(0x2b53760, 0xc000140ca0, 0x2, 0x2, 0x2b53760, 0xc000140ca0)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2b1
github.com/spf13/cobra.(*Command).ExecuteC(0x2b527a0, 0x0, 0x20, 0xc000140820)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:887
k8s.io/minikube/cmd/minikube/cmd.Execute()
        /app/cmd/minikube/cmd/root.go:112 +0x6f5
main.main()
        /app/cmd/minikube/main.go:66 +0xf1

After facing similar issues, I managed to get it working by making sure I had all the Hyper-V 'Windows features' installed. Specially the PowerShell module, which was not at first.

Was this page helpful?
0 / 5 - 0 ratings