Question: is this compatible with Windows 10? #18

Closed
opened 2025-12-28 23:21:05 +01:00 by adam · 23 comments
Owner

Originally created by @kuriel-dev on GitHub (Jun 6, 2020).

is this compatible with Windows 10?

(the question is because https://github.com/kholia/OSX-KVM docs talks about running on Linux only.)

anyway i'm trying right now xD

also i'll try on a WSL2 Ubuntu instance (if Windows fails).

Originally created by @kuriel-dev on GitHub (Jun 6, 2020). is this compatible with Windows 10? (the question is because https://github.com/kholia/OSX-KVM docs talks about running on Linux only.) anyway i'm trying right now xD also i'll try on a WSL2 Ubuntu instance (if Windows fails).
adam closed this issue 2025-12-28 23:21:05 +01:00
Author
Owner

@kneelesh48 commented on GitHub (Jun 7, 2020):

Let me know if it worked. I'm interested in the results.

@kneelesh48 commented on GitHub (Jun 7, 2020): Let me know if it worked. I'm interested in the results.
Author
Owner

@sickcodes commented on GitHub (Jun 7, 2020):

Try this https://github.com/sickcodes/Docker-OSX/tree/master/vnc-version

@sickcodes commented on GitHub (Jun 7, 2020): Try this https://github.com/sickcodes/Docker-OSX/tree/master/vnc-version
Author
Owner

@Silfalion commented on GitHub (Jun 7, 2020):

did you use WSL2? and how were you able to set up the GUI for it please?

@Silfalion commented on GitHub (Jun 7, 2020): did you use WSL2? and how were you able to set up the GUI for it please?
Author
Owner

@sickcodes commented on GitHub (Jun 7, 2020):

Try this https://github.com/myspaghetti/macos-virtualbox

@sickcodes commented on GitHub (Jun 7, 2020): Try this https://github.com/myspaghetti/macos-virtualbox
Author
Owner

@kuriel-dev commented on GitHub (Jun 7, 2020):

@sickcodes thanks, when using WSL/2 virtualbox does not works.

@kuriel-dev commented on GitHub (Jun 7, 2020): @sickcodes thanks, when using WSL/2 virtualbox does not works.
Author
Owner

@sickcodes commented on GitHub (Jun 7, 2020):

This will probably work.

https://sourceforge.net/projects/vcxsrv/

  • Install VcXsrv on windows and start it up.
  • Install x11-apps in your WSL/2
# WSL/2 
sudo apt-get install x11-apps
DISPLAY=:0.0 xclock

It should open on your Windows desktop (to verify that X11 is working)

Then you should be able to run the normal docker command at the top of the readme :)

Unless nested virtualization is not enabled on WSL/2

Credit angellus:
https://www.reddit.com/r/bashonubuntuonwindows/comments/apm0vx/comment/egacocz

@sickcodes commented on GitHub (Jun 7, 2020): This will probably work. https://sourceforge.net/projects/vcxsrv/ - Install VcXsrv on windows and start it up. - Install x11-apps in your WSL/2 ``` # WSL/2 sudo apt-get install x11-apps DISPLAY=:0.0 xclock ``` It should open on your Windows desktop (to verify that X11 is working) Then you should be able to run the normal docker command at the top of the readme :) Unless nested virtualization is not enabled on WSL/2 Credit angellus: https://www.reddit.com/r/bashonubuntuonwindows/comments/apm0vx/comment/egacocz
Author
Owner

@kuriel-dev commented on GitHub (Jun 7, 2020):

did you use WSL2? and how were you able to set up the GUI for it please?

Yes, i'm using WSL2, im using X410 for GUI but you can use a free alternative, i'll add steps to make it run all Docker-OSX on next comment.

if you wish to use X410 install from Microsoft Store, then:

  • Start a Linux WSL instance
  • edit bash running
    sudo nano ~/.bashrc (enter your sudo password)
  • add this to the last line (so you dont have to add DISPLAY=X to every start app)
    export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
  • Allow Public Access from Windows System Tray Icon
    image
  • Exit and Enter from the WSL instance then Run a GUI app from WSL instance for example:
    gedit&

IMPORTANT NOTE: Check your Firewall of Windows or Antivirus blocking ports to x410 (x server) and allow them

This should work.

@kuriel-dev commented on GitHub (Jun 7, 2020): > did you use WSL2? and how were you able to set up the GUI for it please? Yes, i'm using WSL2, im using X410 for GUI but you can use a free alternative, i'll add steps to make it run all Docker-OSX on next comment. if you wish to use X410 install from Microsoft Store, then: - Start a Linux WSL instance - edit bash running `sudo nano ~/.bashrc` (enter your sudo password) - add this to the last line (so you dont have to add DISPLAY=X to every start app) `export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0` - Allow Public Access from Windows System Tray Icon ![image](https://user-images.githubusercontent.com/17342546/83971857-fcf05a80-a8a2-11ea-9a45-660def7e7c43.png) - Exit and Enter from the WSL instance then Run a GUI app from WSL instance for example: `gedit&` > IMPORTANT NOTE: Check your Firewall of Windows or Antivirus blocking ports to x410 (x server) and allow them This should work.
Author
Owner

@Silfalion commented on GitHub (Jun 7, 2020):

These are fantastic infos, thank you. I'll test them asap:)

@Silfalion commented on GitHub (Jun 7, 2020): These are fantastic infos, thank you. I'll test them asap:)
Author
Owner

@sickcodes commented on GitHub (Jun 8, 2020):

@ningacoding so you got it working fine?

Even better you could add the Arch Linux WSL and just enter the commands in from the Dockerfile

@sickcodes commented on GitHub (Jun 8, 2020): @ningacoding so you got it working fine? Even better you could add the Arch Linux WSL and just enter the commands in from the Dockerfile
Author
Owner

@b0kch01 commented on GitHub (Jun 8, 2020):

I got Ubuntu, WSL 2, XLaunch working well. Where do I go from there?

@b0kch01 commented on GitHub (Jun 8, 2020): I got Ubuntu, WSL 2, XLaunch working well. Where do I go from there?
Author
Owner

@RYOSKATE commented on GitHub (Jun 8, 2020):

@ningacoding @sickcodes
Thanks for the great information.
I tried to configure WSL2(Ubuntu) and VcXsrv, but I got an error when executing the following command.

$docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize kvm: No such file or directory

$sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
$sudo systemctl enable libvirtd.service
$sudo systemctl enable virtlogd.service
$sudo modprobe kvm
modprobe: FATAL: Module kvm not found in directory /lib/modules/4.19.84-microsoft-standard

Have you made any other changes to your WSL?
After doing a little research, I realized that I may have to rebuild the wsl kernel, did you do that?

@RYOSKATE commented on GitHub (Jun 8, 2020): @ningacoding @sickcodes Thanks for the great information. I tried to configure WSL2(Ubuntu) and VcXsrv, but I got an error when executing the following command. ```bash $docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize kvm: No such file or directory $sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager $sudo systemctl enable libvirtd.service $sudo systemctl enable virtlogd.service $sudo modprobe kvm modprobe: FATAL: Module kvm not found in directory /lib/modules/4.19.84-microsoft-standard ``` Have you made any other changes to your WSL? After doing a little research, I realized that I may have to rebuild the wsl kernel, did you do that?
Author
Owner

@b0kch01 commented on GitHub (Jun 8, 2020):

Also stuck there :/
Apparently WSL never wanted to support virtualization.

Edit: ok so on this thread:

https://github.com/microsoft/WSL/issues/4193

The latest fast build of windows is supposed to include kvm installed (for Intel)

@b0kch01 commented on GitHub (Jun 8, 2020): Also stuck there :/ Apparently WSL never wanted to support virtualization. Edit: ok so on this thread: https://github.com/microsoft/WSL/issues/4193 The latest fast build of windows is supposed to include kvm installed (for Intel)
Author
Owner

@kuriel-dev commented on GitHub (Jun 8, 2020):

WSL2 virtualization is supported:

Add a file at C:\Users\<username>\.wslconfig

with content:

[wsl2]
nestedVirtualization=true

Restart WSL2 with:

wsl --shutdown
wsl

Check if your Kernel supports kvm (newer WSL2 kernels does), with kvm-ok

image

install kvm-ok if prompt to install.

@kuriel-dev commented on GitHub (Jun 8, 2020): WSL2 virtualization is supported: Add a file at `C:\Users\<username>\.wslconfig` with content: ``` [wsl2] nestedVirtualization=true ``` Restart WSL2 with: ``` wsl --shutdown wsl ``` Check if your Kernel supports kvm (newer WSL2 kernels does), with kvm-ok ![image](https://user-images.githubusercontent.com/17342546/83983622-6dc06280-a8f5-11ea-9060-70eca9d8bb5f.png) > install kvm-ok if prompt to install.
Author
Owner

@kuriel-dev commented on GitHub (Jun 8, 2020):

Enable Systemd in Ubuntu if needed:

https://github.com/damionGans/ubuntu-wsl2-systemd-script

@kuriel-dev commented on GitHub (Jun 8, 2020): Enable Systemd in Ubuntu if needed: https://github.com/damionGans/ubuntu-wsl2-systemd-script
Author
Owner

@kuriel-dev commented on GitHub (Jun 8, 2020):

After those steps you should be able to Install Docker and Docker-OSX with Containers over containers:
Windows>Ubuntu18.04>Docker>Arch>MacOs

@kuriel-dev commented on GitHub (Jun 8, 2020): After those steps you should be able to Install Docker and Docker-OSX with Containers over containers: Windows>Ubuntu18.04>Docker>Arch>MacOs
Author
Owner

@b0kch01 commented on GitHub (Jun 8, 2020):

Thanks so much!

Edit: Ok kvm is up and running! I did need to update to the latest preview build for windows.

@b0kch01 commented on GitHub (Jun 8, 2020): Thanks so much! Edit: Ok kvm is up and running! I **did** need to update to the latest preview build for windows.
Author
Owner

@theLastOfCats commented on GitHub (Jun 9, 2020):

Confirm, launched. Little bit laggy and WSL starts using 16G of ram

@theLastOfCats commented on GitHub (Jun 9, 2020): Confirm, launched. Little bit laggy and WSL starts using 16G of ram
Author
Owner

@kuriel-dev commented on GitHub (Jun 9, 2020):

Confirm, launched. Little bit laggy and WSL starts using 16G of ram

The problem with WSL it's the ausence of GPU and the problem with QEMU you can't choose a better CPU (the cpu of this repository is Core 2 Duo :/ )

@kuriel-dev commented on GitHub (Jun 9, 2020): > Confirm, launched. Little bit laggy and WSL starts using 16G of ram The problem with WSL it's the ausence of GPU and the problem with QEMU you can't choose a better CPU (the cpu of this repository is Core 2 Duo :/ )
Author
Owner

@Mik4sa commented on GitHub (May 22, 2021):

I'm currently on Windows Pro 21H1 (Build 19043.985) and I can't get kvm to work. sudo kvm-ok always outputs:

INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used

After reading https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/ and https://dev.to/nicole/running-macos-on-windows-10-with-wsl2-kvm-and-qemu-21e1 it looks like I need to join Windows insider and update my Windows to the dev channel. Is this right? Is there any way around this?

Reading the comments here it looks like it should work with my version, but I'm not sure. I can't get it to work.
Any ideas?

I tried 5.4.72-microsoft-standard-WSL2 and 5.10.16.3-microsoft-standard-WSL2, both didn't worked.

I appreciate any help.

@Mik4sa commented on GitHub (May 22, 2021): I'm currently on Windows Pro 21H1 (Build 19043.985) and I can't get kvm to work. `sudo kvm-ok` always outputs: ``` INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used ``` After reading https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/ and https://dev.to/nicole/running-macos-on-windows-10-with-wsl2-kvm-and-qemu-21e1 it looks like I need to join Windows insider and update my Windows to the dev channel. Is this right? Is there any way around this? Reading the comments here it looks like it should work with my version, but I'm not sure. I can't get it to work. Any ideas? I tried 5.4.72-microsoft-standard-WSL2 and 5.10.16.3-microsoft-standard-WSL2, both didn't worked. I appreciate any help.
Author
Owner

@a10kiloham commented on GitHub (Aug 11, 2021):

KVM at least works on the newest dev builds including Windows 11.

@a10kiloham commented on GitHub (Aug 11, 2021): KVM at least works on the newest dev builds including Windows 11.
Author
Owner

@emueyes commented on GitHub (Aug 14, 2021):

After following the superb https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/ and compiling a few kernels both KVM module and builtin I find KVM still does not work with Ubuntu/Microsoft 5.10.43.3 and Windows (Home64) 21H1 19043.1165

Perhaps there are settings within Windows that determine how it treats hypervisors or VM?

Edit: /sys/module/kvm_intel/parameters/nested actually shows Y

@emueyes commented on GitHub (Aug 14, 2021): After following the superb https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/ and compiling a few kernels both KVM module and builtin I find KVM still does not work with Ubuntu/Microsoft 5.10.43.3 and Windows (Home64) 21H1 19043.1165 Perhaps there are settings within Windows that determine how it treats hypervisors or VM? Edit: /sys/module/kvm_intel/parameters/nested actually shows Y
Author
Owner

@JoseHuertasDev commented on GitHub (Aug 31, 2021):

does it works for AMD?

@JoseHuertasDev commented on GitHub (Aug 31, 2021): does it works for AMD?
Author
Owner

@carellano commented on GitHub (Nov 1, 2021):

does it works for AMD?

I got it working on my Zephyrus laptop
AMD Ryzen 9 5900HS

Edition Windows 11 Pro Insider Preview
OS build 22489.1000

.wslconfig
[wsl2]
memory = 8GB # Limits VM memory in WSL 2 to 4 GB
processors = 6 # Makes the WSL 2 VM use two virtual processors
nestedVirtualization = true
kernelCommandLine = amd_iommu = on iommu = pt kvm.ignore_msrs = 1 kvm-amd.nested = 1 kvm-amd.ept = 1 kvm-amd.emulate_invalid_guest_state = 0 kvm-amd.enable_shadow_vmcsd = 1 kvm-amable_vmcsd = 1 kvm-amable_vmcsd = 1 kvm-amd.

@carellano commented on GitHub (Nov 1, 2021): > does it works for AMD? I got it working on my Zephyrus laptop AMD Ryzen 9 5900HS Edition Windows 11 Pro Insider Preview OS build 22489.1000 .wslconfig [wsl2] memory = 8GB # Limits VM memory in WSL 2 to 4 GB processors = 6 # Makes the WSL 2 VM use two virtual processors nestedVirtualization = true kernelCommandLine = amd_iommu = on iommu = pt kvm.ignore_msrs = 1 kvm-amd.nested = 1 kvm-amd.ept = 1 kvm-amd.emulate_invalid_guest_state = 0 kvm-amd.enable_shadow_vmcsd = 1 kvm-amable_vmcsd = 1 kvm-amable_vmcsd = 1 kvm-amd.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#18