Closed CrossBound closed 4 years ago
According to this page https://multipass.run/docs/installing-on-windows it sounds like anything later than 1803 should be supported, but I'm on 1809 and still getting the error.
Hi @CrossBound, could you please let us know the output of this command in PowerShell?
PS> Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion"
…
CurrentMajorVersionNumber : 10
…
If that number isn't "10" (which is what we compare), something's weird with your system…
Here is my output:
SystemRoot : C:\WINDOWS
BuildBranch : rs5_release
BuildGUID : ffffffff-ffff-ffff-ffff-ffffffffffff
BuildLab : 17763.rs5_release.180914-1434
BuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
CompositionEditionID : Enterprise
CurrentBuild : 17763
CurrentBuildNumber : 17763
CurrentMajorVersionNumber : 10
CurrentMinorVersionNumber : 0
CurrentType : Multiprocessor Free
CurrentVersion : 6.3
EditionID : Enterprise
EditionSubManufacturer :
EditionSubstring :
EditionSubVersion :
InstallationType : Client
InstallDate : 1561644241
ProductName : Windows 10 Enterprise
ReleaseId : 1809
SoftwareType : System
UBR : 973
PathName : C:\WINDOWS
ProductId : 00329-00000-00003-AA284
DigitalProductId : {164, 0, 0, 0...}
DigitalProductId4 : {248, 4, 0, 0...}
CM_DSLID : P02:P0100027
RegisteredOwner : Legacy Bank
RegisteredOrganization : Legacy Bank
InstallTime : 132061178412504812
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT
PSChildName : CurrentVersion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
Immediately after running the command above (in the same powershell instance) I ran multipass shell
and got the same error: launch failed: Multipass support for Hyper-V requires Windows 10
@CrossBound,
Hmm, very strange. The exact command we run is:
Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" | Select-Object -ExpandProperty CurrentMajorVersionNumber
Could you please run that and see what the output is? I'm wondering if there is some difference in Select-Object
...
PS C:\Users\davidt> Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" | Select-Object -ExpandProperty CurrentMajorVersionNumber
10
I'm totally stumped on how you are getting this error then. Your machine is reporting the value that we are looking for. I'll have to think about this some more.
I also have the same problem my registry also has 10 for the major version number:
Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" | Select-Object -ExpandProperty CurrentMajorVersionNumber
10
I also checked my application event log and found the following warning:
[Qt] QIODevice::write (QFile, "C:\WINDOWS\system32\config\systemprofile\AppData\Local\multipassd\cache\vault\multipassd-image-records.json"): device not open
Hi @DavidTheSysAdmin, that is just a warning, nothing worrying there.
I wonder if your troubles are down to locale? Maybe we're getting some non-printable characters from PowerShell?
@Saviq, my system is set to west coast time with standard US everything else. I know hyperV is installed, I have a couple VMs running wihtout any issues.
Any ideas what is causing this, or how to fix it?
Hi @DavidTheSysAdmin we'll have to prepare a build with more debugging enabled… stay tuned.
@DavidTheSysAdmin what do you get if you run 'Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online' in powershell?
Same problem for me on Multipass 1.3, message:
launch failed: Multipass support for Hyper-V requires Windows 10
I'm on Windows 10 2004 (10.0.19041.1) with WSL2 enabled (if it makes any difference), above mentioned command for Hyper-V returns:
FeatureName : Microsoft-Hyper-V-All
DisplayName : Hyper-V
Description : Provides services and management tools for creating and running virtual machines and their resources.
RestartRequired : Possible
State : Enabled
CustomProperties :
@szymonos how about this:
PS> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-Hypervisor -Online
Could you please report what's your exact launch
error?
@DavidTheSysAdmin what do you get if you run 'Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online' in powershell?
@CrossBound here is the output of that command:
> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online
FeatureName : Microsoft-Hyper-V-All
DisplayName : Hyper-V
Description : Provides services and management tools for creating and running virtual machines and their
resources.
RestartRequired : Possible
State : Enabled
CustomProperties :
@DavidTheSysAdmin how about Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-Hypervisor -Online
(notice "Hypervisor" rather than "All")?
@Saviq, here is the output:
> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-Hypervisor -Online
FeatureName : Microsoft-Hyper-V-Hypervisor
DisplayName : Hyper-V Hypervisor
Description : Provides the Hyper-V Hypervisor.
RestartRequired : Possible
State : Enabled
CustomProperties :
@DavidTheSysAdmin,
Could you please paste the exact output of the error when issuing the launch command?
@DavidTheSysAdmin and the exact error you're getting is Multipass support for Hyper-V requires Windows 10?
That basically means that "10" != "10"… I mean, this "10":
Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" | Select-Object -ExpandProperty CurrentMajorVersionNumber 10
Doesn't equal the "10" we're expecting…
@DavidTheSysAdmin if you would be so kind, can you go to Services, find Multipass in there, stop it and start with --verbosity trace
. Then, after you try a multipass launch
, please have a look in the Event Viewer and try and weed out the messages that have "Hyper-V Health Check" in them… That will hopefully shed a bit of light on what's going on.
At this point I'm considering something like an unprinted character that we need to trim…
To expand more on the value of "CurrentMajorVersionNumber" in my registry, consider the following:
> (Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" ).CurrentMajorVersionNumber
10
> (Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" ).CurrentMajorVersionNumber.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Int32 System.ValueType
The first command shows that "10" is returned. The second command shows that the type of the value returned is an int, which would seem to preclude the possiblility of there being a weird character in the return value.
I also changed my Multipass service to run with "trace" verbosity. Here is the output of the powershell command to find the windows version:
[Hyper-V Health Check] __ __ _
\ \ / / (_)
\ \_/ /__ _ _ __ _ _ __ ___ _ __ _ _ _ __ _ __ _ _ __ __ _
\ / _ \| | | | / _` | '__/ _ \ | '__| | | | '_ \| '_ \| | '_ \ / _` |
| | (_) | |_| | | (_| | | | __/ | | | |_| | | | | | | | | | | | (_| |
|_|\___/ \__,_| \__,_|_| \___| |_| \__,_|_| |_|_| |_|_|_| |_|\__, |
_ _ _ _ _ __/ |
/\ | | (_) (_) | | | | |___/
__ _ ___ / \ __| |_ __ ___ _ _ __ _ ___| |_ _ __ __ _| |_ ___ _ __
/ _` / __| / /\ \ / _` | '_ ` _ \| | '_ \| / __| __| '__/ _` | __/ _ \| '__|
| (_| \__ \ / ____ \ (_| | | | | | | | | | | \__ \ |_| | | (_| | || (_) | |
\__,_|___/ /_/ \_\__,_|_| |_| |_|_|_| |_|_|___/\__|_| \__,_|\__\___/|_|
_____ _ __ _ _____
/ ____| | | /\ / _| | | __ \
| | __ ___ ___ __| | / \ | |_| |_ ___ _ __ _ __ ___ ___ _ __ | | | | __ ___ _____
| | |_ |/ _ \ / _ \ / _` | / /\ \ | _| __/ _ \ '__| '_ \ / _ \ / _ \| '_ \ | | | |/ _` \ \ / / _ \
| |__| | (_) | (_) | (_| | / ____ \| | | || __/ | | | | | (_) | (_) | | | | | |__| | (_| |\ V / __/
\_____|\___/ \___/ \__,_| /_/ \_\_| \__\___|_| |_| |_|\___/ \___/|_| |_| |_____/ \__,_| \_/ \___|
The [Env] class can be used to manipulate this powershell environment
The [Util] class has some useful utilities
10
Here is where it gets interesting, as you can see there is alot of extra text being returned because its loading my system's powershell profile.ps1. Updating your code to utilize the following command should fix the problem:
powershell.exe -NoProfile -C "(Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion').CurrentMajorVersionNumber"
The "-NoProfile" switch will prevent it from loading any profiles and removing the pipe into "Select-Object" and just selecting the "CurrentMajorVersionNumber" property directly from the object returned from "Get-ItemProperty" should perform better and be fully compatible with older and newer versions of powershell.
@DavidTheSysAdmin you may be on to something with the profile... I also have custom code that runs in my PowerShell profile.
I would completley agree that the -NoProfile
switch should be used.
@DavidTheSysAdmin thank you! I've built a dev package with -NoProfile
added to the PowerShell execution.
Here's the zipped (GitHub doesn't like .exes) installer: multipass-1.4.0-dev.114+g9ece0ebb.win-win64.zip.
It would be great if you guys gave it a whirl! You can also use multipass launch -vvvv
to get some debugging out of the command.
W00t! It looks like we have a winner. I no longer get the "launch failed: Multipass support for Hyper-V requires Windows 10" error.
> multipass launch --name ubuntu-lts
Launched: ubuntu-lts
@DavidTheSysAdmin thank you! Thanks for digging, don't think we would have stumbled upon this, not working on Windows day to day…
This is good news. Do you know what version I can expect this change to be deployed in?
Hi @CrossBound, it will be in our next release, planned for 3-4 weeks from now.
Hi,
I downloaded the 1.40 development version you posted and am still getting the error. I am running Windows 10 2004 and do have the Arabic language pack installed, though the primary language is English. Thanks.
You get this warning from PowerShell if you are running a screen reader (which I am) upon startup: "Warning: PowerShell detected that you might be using a screen reader and has disabled PSReadLine for compatibility purposes. If you want to re-enable it, run 'Import-Module PSReadLine'." See below [2020-07-03T21:53:14.577] [debug] [Hyper-V Health Check] powershell arguments '-NoExit, -Command, -' [2020-07-03T21:53:14.577] [debug] [Hyper-V Health Check] powershell working dir '' [2020-07-03T21:53:14.577] [debug] [Hyper-V Health Check] powershell program 'powershell.exe' [2020-07-03T21:53:14.577] [debug] [Hyper-V Health Check] powershell state changed to Starting [2020-07-03T21:53:14.579] [debug] [Hyper-V Health Check] powershell state changed to Running [2020-07-03T21:53:14.580] [debug] [Hyper-V Health Check] powershell started [2020-07-03T21:53:14.580] [trace] [Hyper-V Health Check] cmdlet: 'Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion' | Select-Object -ExpandProperty CurrentMajorVersionNumber' [2020-07-03T21:53:15.041] [trace] [Hyper-V Health Check] Warning: PowerShell detected that you might be using a screen reader and has disabled PSReadLine for compatibility purposes. If you want to re-enable it, run 'Import-Module PSReadLine'. 10 [2020-07-03T21:53:15.042] [trace] [Hyper-V Health Check] cmdlet exit status is 'true' [2020-07-03T21:53:15.065] [debug] [Hyper-V Health Check] powershell state changed to NotRunning [2020-07-03T21:53:15.065] [debug] [Hyper-V Health Check] powershell finished with exit code 0 launch failed: Multipass support for Hyper-V requires Windows 10 [2020-07-03T21:53:15.118] [warning] [winterm] Could not find Windows Terminal's settings; location: ""; reason: File not found.
My apologies to post in closed ticket, but this issue appears to be still present in v1.5.0:
> Get-ComputerInfo | select windowsproductname, windowsversion, HyperVisorPresent
WindowsProductName WindowsVersion HyperVisorPresent
------------------ -------------- -----------------
Windows 10 Pro for Workstations 2009 True
> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online
FeatureName : Microsoft-Hyper-V-All
DisplayName : Hyper-V
Description : Provides services and management tools for creating and running virtual machines and their resources.
RestartRequired : Possible
State : Enabled
CustomProperties :
> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-Hypervisor -Online
FeatureName : Microsoft-Hyper-V-Hypervisor
DisplayName : Hyper-V Hypervisor
Description : Provides the Hyper-V Hypervisor.
RestartRequired : Possible
State : Enabled
CustomProperties :
> multipass version
multipass 1.5.0+win
multipassd 1.5.0+win
> multipass launch -vvvv
[2020-11-12T12:49:11.632] [debug] [Hyper-V Health Check] PowerShell arguments '-NoProfile, -NoExit, -Command, -'
[2020-11-12T12:49:11.633] [debug] [Hyper-V Health Check] PowerShell working dir ''
[2020-11-12T12:49:11.633] [debug] [Hyper-V Health Check] PowerShell program 'powershell.exe'
[2020-11-12T12:49:11.634] [debug] [basic_process] starting: powershell.exe -NoProfile -NoExit -Command -
[2020-11-12T12:49:11.638] [debug] [Hyper-V Health Check] PowerShell started
[2020-11-12T12:49:11.638] [trace] [Hyper-V Health Check] Cmdlet: 'Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion' | Select-Object -ExpandProperty CurrentMajorVersionNumber'
[2020-11-12T12:49:12.073] [trace] [Hyper-V Health Check] Cannot load PSReadline module. Console is running without PSReadline.
10
[2020-11-12T12:49:12.073] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-11-12T12:49:12.090] [debug] [Hyper-V Health Check] PowerShell finished successfully
launch failed: Multipass support for Hyper-V requires Windows 10
Hi @vendvahk, we have #1632 to track that actually. In your case, the msg is a bit different, so you may be able to workaround by installing PSReadline if it's absent, with something like:
Import-Module PowerShellGet
Import-Module PSReadline
Thank you @ricab for pointing to right direction. Actually PSReadline is installed, but I found that PS ExecutionPolicy looks to be actual issue. I had to set it temporarily Unrestricted and then import PSReadline module. After that multipass launch started to work. Also it looks that multipass launch command is still working after I chaged PS ExecutionPolicy back to RemoteSigned.
I see. OK, great to know you overcame that @vendvahk. We'll keep #1632 to implement a proper way to handle such warnings.
I have downloaded Multipass from the website, version is 1.0.0+win. When I run
multipass shell
I get the errorlaunch failed: Multipass support for Hyper-V requires Windows 10
I am running Windows 10 Enterprise 1809 (Build 17763.973) x64.