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

Not Recognizing Hyper-V on Windows 10 #1548

Open
lildonpancho opened this issue May 20, 2020 · 16 comments
Open

Not Recognizing Hyper-V on Windows 10 #1548

lildonpancho opened this issue May 20, 2020 · 16 comments
Labels

Comments

@lildonpancho
Copy link

I have enabled Hyper-V on Windows 10 Pro using the following command:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

I receive the following output:

Path          :
Online        : True
RestartNeeded : False

I try to start up Multipass using default settings (hyperv driver enabled by default):

multipass launch test-instance

It waits a few seconds before I get the following message:

start failed: The computer needs to be rebooted in order for Hyper-V to be fully available
I rebooted the computer and tried to start again with the same command and received the same result.

I then tried to explicitly set the driver using the following:

multipass set local.driver=hyperv

I run the command to launch an instance again and I get the same message telling me to reboot.

I then rebooted and tried to launch an instance again and got the same message. I have tried Disabling and renabling Hyper-v as well as downgrading/reinstalling Multipass with the same result.

Additional info

  • Windows 10 Pro 18363
  • multipass 1.2.1+win
  • multipassd 1.2.1+win
@townsend2010
Copy link
Contributor

Hi @lildonpancho,

Sorry you're having issues getting this to work. For some reason, our health check is thinking Hyper-V is installed, but the hypervisor is not present. Could you please post the output of:
Get-CimInstance Win32_ComputerSystem

Thanks!

@jlhale
Copy link

jlhale commented May 20, 2020

Not the OP but I have the exact same problem and went through the exact same options (and some others) to try to fix it.

PS C:\Users\Jonathan> Get-CimInstance Win32_ComputerSystem

Name             PrimaryOwnerName     Domain               TotalPhysicalMemory  Model               Manufacturer
----             ----------------     ------               -------------------  -----               ------------
JONATHAN-PC                           WORKGROUP            16992415744          XPS 15 9560         Dell Inc.


PS C:\Users\Jonathan>

@jlhale
Copy link

jlhale commented May 21, 2020

I don't know if this is what actually fixed it for me, but I uninstalled Dell SupportAssist, rebooted, then uninstalled Hyper-V again, rebooted, installed Hyper-V on the command line (trying to run multipass told me what command to run), rebooted, and then it worked

@n8urton
Copy link

n8urton commented Jun 7, 2020

I'm also having issues getting multipass to work

Windows 10 Build 19041
Multipass version 1.2.1+win

❯ multipass launch
launch failed: Multipass support for Hyper-V requires Windows 10

I have confirmed Hyper-V is enabled and have I have manually created VMs that work. Any help is appreciated

@nunix
Copy link

nunix commented Jun 8, 2020

I will "jump" into the thread for sharing that this happens also on Windows Server 2019:
image

The error is a bit more explicit here, and the issue might come from the way Multipass checks if Hyper-V is enabled or not.
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V works on both for example.

@Saviq
Copy link
Collaborator

Saviq commented Jun 9, 2020

Hi @nunix, can you tell me if the "Default Switch" exists on Server, like on the other editions?

PS> Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444

If that works, does .mshome.net resolve?

PS> ping <hostname>.machine.net

@nunix
Copy link

nunix commented Jun 9, 2020

Hi Saviq,
thanks a lot for your prompt reply. The VMSwitch does not exist indeed.
I will try to create it and let you know how it went.

@pvandervelde
Copy link

Has this been fixed yet? I'm running into a similar problem trying to install multipass using the hyper-v provider (with multipass 1.5). It works on my desktop but doesn't work on my laptop. Hyper-V is enabled on both and I used to have microk8s installed on both (which installed multipass 1.2). My windows version is:

Edition Windows 10 Pro
Version 20H2
Installed on ‎7/‎08/‎2020
OS build 19042.685
Serial number 016118483557
Experience Windows Feature Experience Pack 120.2212.551.0

The default switch exist:

image

❯ Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444

Name           SwitchType NetAdapterInterfaceDescription
----           ---------- ------------------------------
Default Switch Internal

and I can ping my laptop (fro❯ ping transmogrifier.mshome.net

Pinging TRANSMOGRIFIER.mshome.net [172.26.224.1] with 32 bytes of data:
Reply from 172.26.224.1: bytes=32 time<1ms TTL=128
Reply from 172.26.224.1: bytes=32 time<1ms TTL=128
Reply from 172.26.224.1: bytes=32 time<1ms TTL=128
Reply from 172.26.224.1: bytes=32 time<1ms TTL=128

Ping statistics for 172.26.224.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0msm my laptop) via `mshome.net`

@pvandervelde
Copy link

I just tried installing older versions of multipass. 1.21 works, 1.3.0 does not, neither do 1.4.0 and 1.5.0.

@pvandervelde
Copy link

@townsend2010 @Saviq See above for possibly more info that might be helpful diagnosing the issue. And let me know if you need anything other information.

@Saviq
Copy link
Collaborator

Saviq commented Dec 24, 2020

Hi @pvandervelde can you describe what your exact issue is? What error is printed when you multipass launch -vvvv with 1.5.0?

@pvandervelde
Copy link

@Saviq My issue is that the installer fails to detect Hyper-V but apparently it works when multipass runs. See screenshots:

image
image
image
image

When I run multipass launch -vvvv I get the following

❯ multipass launch -vvvv
[2020-12-25T09:03:24.734] [warning] [process] Process is already in Job, spawned processes will not be cleaned up
[2020-12-25T09:03:24.734] [debug] [Hyper-V Health Check] PowerShell arguments '-NoProfile, -NoExit, -Command, -'
[2020-12-25T09:03:24.735] [debug] [Hyper-V Health Check] PowerShell working dir ''
[2020-12-25T09:03:24.735] [debug] [Hyper-V Health Check] PowerShell program 'powershell.exe'
[2020-12-25T09:03:24.736] [debug] [basic_process] starting: powershell.exe -NoProfile -NoExit -Command -
[2020-12-25T09:03:24.740] [debug] [Hyper-V Health Check] PowerShell started
[2020-12-25T09:03:24.740] [trace] [Hyper-V Health Check] Cmdlet: 'Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion' | Select-Object -ExpandProperty CurrentMajorVersionNumber'
[2020-12-25T09:03:25.946] [trace] [Hyper-V Health Check] 10
[2020-12-25T09:03:25.946] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-12-25T09:03:25.946] [trace] [Hyper-V Health Check] Cmdlet: 'Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion' | Select-Object -ExpandProperty ReleaseId'
[2020-12-25T09:03:25.978] [trace] [Hyper-V Health Check] 2009
[2020-12-25T09:03:25.978] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-12-25T09:03:25.978] [trace] [Hyper-V Health Check] Cmdlet: 'Get-CimInstance Win32_ComputerSystem | Select-Object -ExpandProperty HypervisorPresent'
[2020-12-25T09:03:26.342] [trace] [Hyper-V Health Check] True
[2020-12-25T09:03:26.342] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-12-25T09:03:26.342] [trace] [Hyper-V Health Check] Cmdlet: 'Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V | Select-Object -ExpandProperty State'
[2020-12-25T09:03:27.039] [trace] [Hyper-V Health Check] Enabled
[2020-12-25T09:03:27.039] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-12-25T09:03:27.039] [trace] [Hyper-V Health Check] Cmdlet: 'Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor | Select-Object -ExpandProperty State'
[2020-12-25T09:03:27.419] [trace] [Hyper-V Health Check] Enabled
[2020-12-25T09:03:27.419] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-12-25T09:03:27.419] [trace] [Hyper-V Health Check] Cmdlet: 'Get-Service -Name vmms | Select-Object -ExpandProperty Status'
[2020-12-25T09:03:27.451] [trace] [Hyper-V Health Check] Running
[2020-12-25T09:03:27.451] [trace] [Hyper-V Health Check] Cmdlet exit status is 'true'
[2020-12-25T09:03:27.483] [debug] [Hyper-V Health Check] PowerShell finished successfully

Launched: blameless-steenbok

And the VM is created.

Similarly I can run the microk8s installer and it creates the VM.

It looks like this might be a different issue. Do you want me to open a new ticket?

@AndrewLamYW
Copy link

I have a similar issue but is gone after I restart my computer.

@whatever778
Copy link

I have a similar issue but is gone after I restart my computer.

It's the same for me. After a restart, it works fine now.

@Ahks
Copy link

Ahks commented Mar 27, 2022

Since this was the top result when I searched for the error "The computer needs to be rebooted in order for Hyper-V to be fully available" I'll leave here what fixed it for me.

My fix was to run "bcdedit /set hypervisorlaunchtype auto" and reboot, which I found here:
https://stackoverflow.com/questions/47081205/simple-instructions-needed-for-enabling-and-disabling-hyper-v-docker

Running Windows 10 21h2
Even after 6+ install/remove/install of Hyper-V the boot flag on my host was set to hypervisorlaunchtype off, so Windows wasn't booting the hypervisor even though Hyper-V was installed.

@antongisli
Copy link

Nice. And for those who want to get Windows 10 Home / Multipass / Hyper-V working, I threw this together (thanks for your solution):
https://medium.com/@antongslismith/multipass-with-hyper-v-on-windows-10-home-7fd783d83978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests