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

Install fails on Windows Server 2019 #1674

Open
biiiipy opened this issue Oct 22, 2020 · 22 comments
Open

Install fails on Windows Server 2019 #1674

biiiipy opened this issue Oct 22, 2020 · 22 comments

Comments

@biiiipy
Copy link
Contributor

biiiipy commented Oct 22, 2020

When installing microk8s on Windows Server 2019 (runs on vmware hypervisor and has nested virtualization enabled), I get the error:

launch failed: The Hyper-V Hypervisor is disabled. Please enable by using the following
command in an Administrator Powershell and reboot:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
launch failed: The Hyper-V Hypervisor is disabled. Please enable by using the following
command in an Administrator Powershell and reboot:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor

Multipass shell fails with the same error.

Btw, the suggested command seems wrong, at least for Windows Server:

PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
Enable-WindowsOptionalFeature : Feature name Microsoft-Hyper-V-Hypervisor is unknown.

But Hyper-v is installed:
image

Hyper-V service is running, but has no VMs:
image

PS C:\Windows\system32> get-service | findstr vmcompute
Running  vmcompute          Hyper-V Host Compute Service

Any ideas where to dig?

@joedborg joedborg self-assigned this Oct 22, 2020
@joedborg
Copy link
Contributor

Probably related to canonical/multipass#1548

@joedborg
Copy link
Contributor

Hi @biiiipy, thanks for raising this. I'm going to try and get access to a Server 2019 machine in order to dig a little deeper. I suspect it's related to the issue raised above where Hyper-V behaves differently on Windows Pro vs Server.

@joedborg
Copy link
Contributor

remmina_ec2-3-88-33-69 compute-1 amazonaws com_ec2-3-88-33-69 compute-1 amazonaws com_20201022-19431 786488

It seems that the Windows Features API is different in Server to Professional. Will have to catch and handle these differences.

@joedborg
Copy link
Contributor

@biiiipy this will probably take quite a bit of engineering work as we see the default switch is not created in Server 2019, so no DNS, DHCP nor NAT so internet access is a pain. If it's an option, I'd recommend using Virtualbox as the backing hypervisor for now.

@biiiipy
Copy link
Contributor Author

biiiipy commented Oct 23, 2020

That means we need to disable hyper-v on hosts, so no windows docker containers (Hyper-V is a prerequisite for Docker runtime on Windows Server) on those hosts, making them dedicated master nodes... And that is tied to the ability to join native windows nodes to mikrok8s cluster - #1300
Anyway, thanks for the help! :)

@joedborg
Copy link
Contributor

Hey @biiiipy, I believe we're going to investigate adding Windows workers to a MicroK8s cluster pretty soon so we should be able to at least give you some documentation at some point in the near future.

As far as Vbox and Hyper-V go, I wasn't aware of any issues running them together, on the same host. What are you seeing when you run both?

Many thanks,
Joe

@biiiipy
Copy link
Contributor Author

biiiipy commented Oct 24, 2020

That's great to hear, can't wait!

It seems that VirtualBox as of version 6.0 is able to run side by side with Hyper-V (with degraded performance though), although on the first look it seems that it only allows running 32 bit OSes. Will have to recheck this...
Anyway, this setup is okey for fooling around, but I don't think we will be able to push through to production... Fingers crossed for microk8s Hyper-V fixes :)

@joedborg
Copy link
Contributor

Hi @biiiipy, as per #1300, we've written up the docs for getting Windows workers enrolled on a MicroK8s cluster https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782

@biiiipy
Copy link
Contributor Author

biiiipy commented Nov 22, 2020

Cool, that's great to hear! Although, why not put it on mikrok8s webpage? It will be a lot easier for other people to find... By googling a million kubernetes issues, I've never been steered to kubernetes forums...
With that issue out of the way, the last missing piece is getting mikrok8s running on windows server, can't wait! :)

@joedborg
Copy link
Contributor

@biiiipy it’ll be on the microk8s docs site; we source that from discourse. It just takes a little time to update the sidebar there, so I was sharing this with you until then.

Getting Multipass (thus MicroK8s) to run on Server 2019 may take some time, but I’ll leave this issue open.

Thanks,
Joe

@PyroGenesis
Copy link

+1 for this issue.

I have a Windows Server 2019 (v1809) machine which has the same issue mentioned above. I tried switching to VirtualBox as well but VirtualBox doesn't seem to work if Hyper-V is enabled.

@arielcattaneo
Copy link

+1 Idem issue in Windows Server 2019 (v1809).

@Paulus88
Copy link

+1 also same issue in Windows Server 2022 (v21H2)

@maphew
Copy link

maphew commented Apr 27, 2022

+1, same issue for me.

PS C:\> systeminfo |findstr -i "^OS"
OS Name:                   Microsoft Windows Server 2019 Standard
OS Version:                10.0.17763 N/A Build 17763
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Server
OS Build Type:             Multiprocessor Free
PS C:\> Get-WindowsFeature -Name "*Hyper*"

Display Name                                            Name                       Install State
------------                                            ----                       -------------
[X] Hyper-V                                             Hyper-V                        Installed
        [X] Hyper-V Management Tools                    RSAT-Hyper-V-Tools             Installed
            [X] Hyper-V GUI Management Tools            Hyper-V-Tools                  Installed
            [X] Hyper-V Module for Windows PowerShell   Hyper-V-PowerShell             Installed
PS D:\apps\MicroK8s> .\microk8s.exe install --cpu 10 --mem 10 --disk 50
launch failed: The Hyper-V Hypervisor is disabled. Please enable by using the following
command in an Administrator Powershell and reboot:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
launch failed: The Hyper-V Hypervisor is disabled. Please enable by using the following
command in an Administrator Powershell and reboot:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
One quick question before we launch … Would you like to help
the Multipass developers, by sending anonymous usage data?
This includes your operating system, which images you use,
the number of instances, their properties and how long you use them.
We’d also like to measure Multipass’s speed.

[...snip...repeats...x3...]

An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
PS D:\apps\MicroK8s>

Edited to add service info:

PS D:\apps\MicroK8s> get-service vm*

Status   Name               DisplayName
------   ----               -----------
Running  vmcompute          Hyper-V Host Compute Service
Stopped  vmicguestinterface Hyper-V Guest Service Interface
Stopped  vmicheartbeat      Hyper-V Heartbeat Service
Stopped  vmickvpexchange    Hyper-V Data Exchange Service
Stopped  vmicrdv            Hyper-V Remote Desktop Virtualizati...
Stopped  vmicshutdown       Hyper-V Guest Shutdown Service
Stopped  vmictimesync       Hyper-V Time Synchronization Service
Stopped  vmicvmsession      Hyper-V PowerShell Direct Service
Stopped  vmicvss            Hyper-V Volume Shadow Copy Requestor
Running  vmms               Hyper-V Virtual Machine Management

@ghost
Copy link

ghost commented Jun 1, 2022

Any update on this? Is microk8s supported on windows server operating systems at all?

@iloseall
Copy link

same issue for me. (2022-08-10 microk8s-installer.exe)

@htxryan
Copy link

htxryan commented Apr 19, 2023

What is the latest on this? Lack of proper Windows Server support is going to force us to abandon MicroK8s, so it would be great to get a definitive answer here.

@ktsakalozos
Copy link
Member

MicroK8s on windows (and Mac) needs a VM to run on. You can provide an Ubuntu VM in whatever ways you see fit on your windows version. The MicroK8s installer uses a tool called multipass to abstract the VM provisioning. On windows multipass has two backends hyper-V and virtualbox, see [1] on how to select the right backend. I suspect that even if Hyper-V is not supported as a backend in your Windows version, Virtualbox should work.

[1] https://multipass.run/docs/installing-on-windows

@cfldtn
Copy link

cfldtn commented Aug 14, 2023

Would someone from Canonical be able to comment on whether we could pay them to accelerate fixing this? It sounds like microk8s / multipass would need to do some work to create the default switch and use the different Hyper-V feature name on Server 2022.

@ThePieMonster
Copy link

@joedborg Any updates here?

@ebibibi
Copy link

ebibibi commented Apr 25, 2024

+1 also same issue in Windows Server 2022.
I wanted to know Windows Server's Hyper-V is not supported in official web page.

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

No branches or pull requests