Reputation: 1712
Setting up Minikube on my Windows 10 Surface laptop and the cluster fails to create. Performed the following steps:
choco install minikube
minikube config --driver=hyperv
minikube start --hyperv-virtual-switch=ExternalWifi
When attempting to start, minikube throws the following error:
PS C:\WINDOWS\system32> minikube start --driver=hyperv
* minikube v1.8.1 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
* Using the hyperv driver based on user configuration
* Downloading VM boot image ...
* Creating hyperv VM (CPUs=2, Memory=4077MB, Disk=20000MB) ...
* Downloading preloaded images tarball for k8s v1.17.3 ...
> preloaded-images-k8s-v1-v1.17.3-docker-overlay2.tar.lz4: 280.46 MiB / 499E0309 09:38:58.605779 11932 main.go:106] libmachine: [stderr =====>] : Hyper-V\New-VM : Failed to modify device 'Memory'.
Invalid memory value assigned for 'minikube'. Memory values must be properly aligned.
'minikube' failed to modify device 'Memory'. (Virtual machine ID 06BCBFDB-C000-4BF4-97BF-D16008DAC326)
Invalid memory value assigned for 'minikube'. The memory value assigned ('4077' MB) is not properly aligned. Try again with a memory value that is properly aligned. (Virtual machine ID
06BCBFDB-C000-4BF4-97BF-D16008DAC326)
At line:1 char:1
+ Hyper-V\New-VM minikube -Path 'C:\Users\myuser\.minikube\machines\m ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-VM], VirtualizationException
+ FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVM
> preloaded-images-k8s-v1-v1.17.3-docker-overlay2.tar.lz4: 289.28 MiB / 499*
X Unable to start VM. Please investigate and run 'minikube delete' if possible: creating host: create: creating: exit status 1
Upvotes: 0
Views: 1783
Reputation: 1315
I used to have a similar issue.It stuck right after: "Creating hyperv VM (CPUs=2, Memory=4096MB, Disk=20000MB)"
That`s why I delete minikube with: minikube delete
And run it again with less ram:
minikube start --driver=hyperv --cpus 2 --memory=2048
Upvotes: 0
Reputation: 1712
When attempting to manually create a VM using the same parameters that the minikube setup was attempting to use, I discovered that Hyper-V requires you to assign memory in 2 MB increments. Minikube was attempting to create a VM with 4077 MB of memory which was causing the failure. When I ran minikube setup with the command below, initialization completed successfully:
minikube start --driver=hyperv --memory=4078m
Upvotes: 3