Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperv: The memory value assigned ('4077' MB) is not properly aligned. #6964

Closed
Phydeauxman opened this issue Mar 9, 2020 · 3 comments · Fixed by #6987
Closed

hyperv: The memory value assigned ('4077' MB) is not properly aligned. #6964

Phydeauxman opened this issue Mar 9, 2020 · 3 comments · Fixed by #6987
Assignees
Labels
co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@Phydeauxman
Copy link

Unable to create minikube cluster on Windows 10 host.

Command run:
minikube start --driver=hyperv

The full output of the command that failed:

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\byboudre\.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

The output of the minikube logs command:

E0309 09:47:40.432352   19896 main.go:106] libmachine: [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


*
X command runner: getting ssh client for bootstrapper: Error creating new ssh host from driver: Error getting ssh host name for driver: Host is not running

The operating system version:
Windows 10 Pro Version 1909 Build 18363.657

@Phydeauxman
Copy link
Author

This error was being caused by the fact that minikube was trying to create a VM with 4077 MB of memory. Hyper-V requires VMs to have memory in 2 MB increments. When specifying the amount of memory explicitly suing the --memory parameter, error went away and VM was successfully created.

@afbjorklund
Copy link
Collaborator

This is related to the brand new “dynamic memory” feature, minikube should probably round off the calculated values... And the Windows CI need some fixing too

@afbjorklund afbjorklund added co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Mar 10, 2020
@tstromberg tstromberg changed the title Hyper-V: Invalid memory value assigned for 'minikube' hyperv: The memory value assigned ('4077' MB) is not properly aligned. Mar 10, 2020
@tstromberg tstromberg self-assigned this Mar 10, 2020
@tstromberg
Copy link
Contributor

The fix is shipping later this week with the next release. My apologies for all the users it has inconvenienced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
3 participants