microk8s: Install fails on Windows Server 2019

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?

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 5
  • Comments: 20 (12 by maintainers)

Most upvoted comments

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

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.

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

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

@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

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

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.