I have created a new virtual switch named as:"Amit minikube"
now , when I'm trying to start that using the below command i get :
PS C:\WINDOWS\system32> minikube start --vm-driver=hyperv --hyperv-virtual-switch "Amit minikube"
>
o minikube v0.34.1 on windows (amd64)
i Tip: Use 'minikube start -p' to create a new cluster, or 'minikube delete' to delete this one.
: Restarting existing hyperv VM for "minikube" ...
! Unable to start VM: start: exit status 1
Any comments from anyone details required from my end?
Thank you for the bug report! Do you mind including the output of:
minikube start --vm-driver=hyperv --hyperv-virtual-switch "Amit minikube" --alsologtostderr -v=9
We don't do a very good job of exposing error messages from HyperV yet.
I was encountering the same error. With the additional error logging I was able to see that it failed on this error:
Unable to start VM: create: creating: open /Users/User/.minikube/cache/iso/minikube-v0.35.0.iso: The system cannot find the path specified.
Creating a symlink allowed for a workaround:
New-Item -Path /Users/ -ItemType SymbolicLink -Value C:/Users/
Then remove your minikube config (rm C:\Users\User\.minikube\) and rerun the the minikube start command.
I can confirm I hit this too:
PS P:\csharp\aperture\keystone\src\Keystone> minikube start --memory 6 -v 7
o minikube v0.35.0 on windows (amd64)
> Creating hyperv VM (CPUs=2, Memory=6MB, Disk=20000MB) ...
@ Downloading Minikube ISO ...
184.42 MB / 184.42 MB [============================================] 100.00% 0s
Creating CA: C:\Users\MikeLloyd\.minikube\certs\ca.pem
Creating client certificate: C:\Users\MikeLloyd\.minikube\certs\cert.pem
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @(Get-Module -ListAvailable hyper-v).Name | Get-Unique
[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 [Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\Get-VMSwitch).Name
[stdout =====>] : Containers
Default Switch
nat
[stderr =====>] :
Downloading C:\Users\MikeLloyd\.minikube\cache\boot2docker.iso from file://C:/Users/MikeLloyd/.minikube/cache/iso/minikube-v0.35.0.iso...
! Unable to start VM: create: creating: open /Users/MikeLloyd/.minikube/cache/iso/minikube-v0.35.0.iso: The system cannot find the path specified.
* Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
- https://github.com/kubernetes/minikube/issues/new
I can confirm that symlinking the directories resolves the issue, but really isn't a fix, just a workaround. @tstromberg do you know where the bit of code is that handles that? I might have some cycles to fix it, I just don't know where to find it.
Facing same issue, C:\Users\admin\.minikube\config\config.json file is not generated.
Here is the log
D:\workdir>minikube start --vm-driver="hyperv" --hyperv-virtual-switch="MinikubeSwitch" -p minikube --alsologtostderr -v=9
W0521 22:34:21.674574 20820 root.go:145] Error reading config file at C:\Users\admin\.minikube\config\config.json: open C:\Users\admin\.minikube\config\config.json: The system cannot find the file specified.
I0521 22:34:21.680571 20820 notify.go:126] Checking for updates...
o minikube v1.0.1 on windows (amd64)
I0521 22:34:21.930410 20820 downloader.go:60] Not caching ISO, using https://storage.googleapis.com/minikube/iso/minikube-v1.0.1.iso
$ Downloading Kubernetes v1.14.1 images in the background ...
I0521 22:34:21.931408 20820 start.go:652] Saving config:
{
"MachineConfig": {
"MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.0.1.iso",
"Memory": 2048,
"CPUs": 2,
"DiskSize": 20000,
"VMDriver": "hyperv",
"ContainerRuntime": "docker",
"HyperkitVpnKitSock": "",
"HyperkitVSockPorts": [],
"XhyveDiskDriver": "ahci-hd",
"DockerEnv": null,
"InsecureRegistry": null,
"RegistryMirror": null,
"HostOnlyCIDR": "192.168.99.1/24",
"HypervVirtualSwitch": "MinikubeSwitch",
"KvmNetwork": "default",
"DockerOpt": null,
"DisableDriverMounts": false,
"NFSShare": [],
"NFSSharesRoot": "/nfsshares",
"UUID": "",
"GPU": false,
"Hidden": false,
"NoVTXCheck": false
},
"KubernetesConfig": {
"KubernetesVersion": "v1.14.1",
"NodeIP": "",
"NodePort": 8443,
"NodeName": "minikube",
"APIServerName": "minikubeCA",
"APIServerNames": null,
"APIServerIPs": null,
"DNSDomain": "cluster.local",
"ContainerRuntime": "docker",
"CRISocket": "",
"NetworkPlugin": "",
"FeatureGates": "",
"ServiceCIDR": "10.96.0.0/12",
"ImageRepository": "",
"ExtraOptions": null,
"ShouldLoadCachedImages": true,
"EnableDefaultCNI": false
}
}
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/kube-proxy:v1.14.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-proxy_v1.14.1
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/kube-apiserver:v1.14.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-apiserver_v1.14.1
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.13 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\k8s-dns-sidecar-amd64_1.14.13
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.13 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\k8s-dns-dnsmasq-nanny-amd64_1.14.13
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.13 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\k8s-dns-kube-dns-amd64_1.14.13
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/etcd:3.3.10 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\etcd_3.3.10
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\kubernetes-dashboard-amd64_v1.10.1
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/coredns:1.3.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\coredns_1.3.1
I0521 22:34:21.931408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/kube-scheduler:v1.14.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-scheduler_v1.14.1
I0521 22:34:21.931408 20820 cache_images.go:309] Attempting to cache image: gcr.io/k8s-minikube/storage-provisioner:v1.8.1 at C:\Users\admin\.minikube\cache\images\gcr.io\k8s-minikube\storage-provisioner_v1.8.1
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/pause:3.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\pause_3.1
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/kube-controller-manager:v1.14.1 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-controller-manager_v1.14.1
I0521 22:34:21.933408 20820 cache_images.go:309] Attempting to cache image: k8s.gcr.io/kube-addon-manager:v9.0 at C:\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-addon-manager_v9.0
I0521 22:34:21.974402 20820 cluster.go:83] Skipping create...Using existing machine configuration
i Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
[stdout =====>] :
[stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".
At line:1 char:3
+ ( Hyper-V\Get-VM minikube ).state
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
+ FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
I0521 22:34:22.801402 20820 cluster.go:102] Machine state:
: Restarting existing hyperv VM for "minikube" ...
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Start-VM minikube
I0521 22:34:22.928402 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-apiserver_v1.14.1
I0521 22:34:23.003401 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-proxy_v1.14.1
I0521 22:34:23.024404 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\k8s-dns-sidecar-amd64_1.14.13
I0521 22:34:23.025406 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\kubernetes-dashboard-amd64_v1.10.1
I0521 22:34:23.033401 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\k8s-dns-dnsmasq-nanny-amd64_1.14.13
I0521 22:34:23.038400 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\coredns_1.3.1
I0521 22:34:23.054400 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\k8s-dns-kube-dns-amd64_1.14.13
I0521 22:34:23.099404 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-scheduler_v1.14.1
I0521 22:34:23.116402 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\pause_3.1
I0521 22:34:23.138401 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\etcd_3.3.10
I0521 22:34:23.169399 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-addon-manager_v9.0
I0521 22:34:23.200400 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\k8s.gcr.io\kube-controller-manager_v1.14.1
I0521 22:34:23.254400 20820 cache_images.go:333] OPENING: \\?\Volume{c728515a-7cbf-4bb8-9c83-aeebd018e083}\Users\admin\.minikube\cache\images\gcr.io\k8s-minikube\storage-provisioner_v1.8.1
[stdout =====>] :
[stderr =====>] : Hyper-V\Start-VM : Hyper-V was unable to find a virtual machine with name "minikube".
At line:1 char:1
+ Hyper-V\Start-VM minikube
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Start-VM], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.StartVM
I0521 22:34:23.467404 20820 start.go:428] StartHost: start: exit status 1
I0521 22:34:23.471404 20820 utils.go:122] non-retriable error: start: exit status 1
W0521 22:34:23.471404 20820 exit.go:99] Unable to start VM: start: exit status 1
! Unable to start VM: start: exit status 1
* Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
- https://github.com/kubernetes/minikube/issues/new
I was encountering the same error. With the additional error logging I was able to see that it failed on this error:
Unable to start VM: create: creating: open /Users/User/.minikube/cache/iso/minikube-v0.35.0.iso: The system cannot find the path specified.Creating a symlink allowed for a workaround:
New-Item -Path /Users/ -ItemType SymbolicLink -Value C:/Users/Then remove your minikube config (
rm C:\Users\User\.minikube\) and rerun the the minikube start command.
Regrettably, there isn't enough information in this issue to make it actionable, and a long enough duration has passed, so this issue is likely difficult to replicate. There are many reasons why this error can be raised, unfortunately we can't see which issue it was without the output of minikube start --alsologtostderr -v=8.
Thanks!
Tried to check is there any VM running on Hyper-V Manager..
I have the same problem, after check on the Hyper-V Manager, there is one VM running, after I stopped the VM and starting to run the minikube, it is running well now.. Maybe out of resource, so the Minikube cloud not starting well..
Hope this is help..
In my case, after a restart and the first creation on HyperV, the issue happened because I tried to run the start command from a non elevated prompt. Once done, it worked perfectly fine
i got it working following
Connected to LAN
Went to Network and Internet/View Network status and Task/ Check the Internet Access
Go to advance > Share > Enable the following
Allow other Network users to connect through this computer internet connection
run the power shell as admin
minikube start --kubernetes-version="v1.18.0" --vm-driver="hyperv" --hyperv-virtual-switch="Minikube"
Most helpful comment
In my case, after a restart and the first creation on HyperV, the issue happened because I tried to run the start command from a non elevated prompt. Once done, it worked perfectly fine