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:

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

PS C:\Windows\system32> get-service | findstr vmcompute
Running vmcompute Hyper-V Host Compute Service
Any ideas where to dig?
Probably related to https://github.com/canonical/multipass/issues/1548
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.

It seems that the Windows Features API is different in Server to Professional. Will have to catch and handle these differences.
@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.
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 - https://github.com/ubuntu/microk8s/issues/1300
Anyway, thanks for the help! :)
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
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 :)
Hi @biiiipy, as per https://github.com/ubuntu/microk8s/issues/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
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! :)
@biiiipy it鈥檒l 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鈥檒l leave this issue open.
Thanks,
Joe