Running Windows in a Docker Container!
Vložit
- čas přidán 24. 07. 2024
- Huge thanks to Ridge for sponsoring the video! Use this link to get up to 30% off through April 1st: ridge.com/wolfgang
dockur/windows by Kroese: github.com/dockur/windows
Follow me:
Mastodon tilde.zone/@notthebee
GitHub github.com/notthebee
Twitch twitch.com/notthebeee
Support the channel:
Patreon / wolfgangschannel
CZcams Members / @wolfgangschannel
Ko-fi (one time donation) ko-fi.com/wolfgangschannel
Videos are edited with Davinci Resolve Studio. I use Affinity Photo for thumbnails and Ableton Live for audio editing.
Video gear:
Camera geni.us/IdnhpP (Amazon)
Main lens geni.us/MF3Ej (Amazon)
Secondary camera geni.us/aQ3l (Amazon)
Secondary lens geni.us/jh0Oy7Y (Amazon)
Microphone geni.us/tgiSqL (Amazon)
Key light geni.us/Gi1zE2 (Amazon)
Softbox geni.us/F86pM (Amazon)
Secondary light geni.us/aciv (Amazon)
Other stuff that I use:
Monitor geni.us/KUzcmcP (Amazon)
Monitor arm geni.us/Ei4x (Amazon)
Laptop stand geni.us/hG7Y39 (Amazon)
Keyboard geni.us/KSR6En (Amazon)
Mouse geni.us/JpQG (Amazon)
Audio interface geni.us/sdhWsC (Amazon)
As an Amazon Associate, I earn from qualifying purchases
CHAPTERS
00:00 Introduction
01:27 Ridge
02:16 Running a Windows 11 Container
02:59 How does it work?
04:17 Configuring RDP and other options
06:35 Running other versions of Windows
08:15 Legality
09:19 Outro - Věda a technologie
Huge thanks to Ridge for sponsoring the video! Use this link to get up to 30% off through April 1st: ridge.com/wolfgang
dockur/windows by Kroese: github.com/dockur/windows
CORRECTION: This will not work on Mac, only on Linux.
It is not running in a docker container. Interesting but the title is really misleading.
“Running Windows in a VM that is run by a Docker container that mounts /dev/kvm from the host, but also automates the installation for you” doesn’t really roll off the tongue
Next step: windows distrobox guest?
Can also create a template / kvm image using packer, and just run it with kvm. Or if using kubernetes, use kubvirt to run them.
Hey Wolfgang - We sent you an email about a paid partnership. Let me know what you think.
Using WSL under Windows 11 to run Docker, which is also running a container for Linux that is running a virtualisation of Windows 11 is so ridiculously cursed and I LOVE it.
Someone stop him!
@@Demios101 no I use windows WSL too its amazing
And I thought using Wine via WSL was cursed enough, that's a whole other level 😱
yeah try runnin mac os under gwsl
It's tempting to try but I know my computer will hate me for that torture.
It is a KVM in the guise of a docker "container".... An interesting project no doubt.
Might actually be useful aswell
then why not use vagrant
It's not running in a Docker Container. It's running in a KVM backed QEMU VM that is automatically configured by a Docker script. Saves some problems with config at least.
it is? lmao containers are just normal processes with some security flags
QEMU is a type-2 userland hypervisor AND a kvm virtualizer. If you set kvm: false in the environment it will run entirely in userland inside docker
7:34 The entirety of RAM and swap being completely pegged by the VMS's
I don't know how you deliver such awesome quality almost every time!!!
I totally loved it!
Wolfgang, superb video. How clever of you to know this is exactly what I was looking for.
Cannot wait for the N100 build video! I’m about to build my home server/nas and I’m about to go with the industrial ASRock board. But I’m holding my horses and waiting patiently for your N100 build. Love your content, keep up the good work! ❤
Good news - it's coming at the end of the month :)
Not sure if you read comments, but great video! You mentioned in your PiKVM video that you can use alternative hardware to run PiKVM other than the raspberry pi, as the Pi isn't really worth it in terms of cost. I'd be really interested in an update on that topic, I believe you specifically mentioned using a cheap TV box instead of a Pi.
What an absolutely impeccable timing... I was _just_ about to set up a VM so I could update my damn mouse (love you logitrash
Why on Earth would one need to UPDATE the mouse? Security vulnerabilities? 🤣
@mikhail-plentev You're laughing, but... www.bleepingcomputer.com/news/security/logitech-unifying-receivers-vulnerable-to-key-injection-attacks/
@@mikhail-pletnev Bug with scrolling, sometimes doesn't register when in wireless mode, super annoying
@@AQDuck, but you still need USB passthrough for it, don't you?
@@LichtTempler As he said in the video, it uses KVM so you can pass any device through
As an Unraid user I just (un)surprisingly found this image in the Apps. I'm giving it a try and thank you for sharing!
Woah! This couldn't have come at a better time! I was just looking for a solution to run a DayZ server, a Windows only application, without needing to leave one of our gaming PCs on all the time.
Now I just need more RAM before I can setup a VM on my Ubuntu server.
oho day Z player here. I love that game
A truly interesting and definitely useful video - well presented. I'm going to give this a try. Thanks!
I love that you used the same port as Proxmox, and used Proxmox as your complicated example of running a VM.
I'm surprised he somehow used KVM with a Mac, or was he remoting into the cluster with that clunky macOs ? or is it a hackintosh also running under KVM ?
@@monad_tcp Medium article "Qemu, virt-manager, and libvirt on macOS with Apple silicon M2".
I can't believe I haven't came across this sooner, this is awesome.
I was just trying to solve this problem and was gonna end up using Cockpit to manage a dedicated Windows VM. I hadn’t even considered putting a VM inside of a Docker container. That’s so simple but so clever.
Has a lot of potential in CI/CD for testing code
I reviewed the project and I couldn't found any option for running any command in the container without using GUI. So only wine containers are still the option.
A great explanation, I followed along and did the Win 11 install on Ubuntu 24.04 LTS and it was seamless. Thanks!!
Docker tends to ignore UFW and writes to iptables, so be careful with that open 3389.
what is the worse scenario
@churchofsatan2041 you run this on an unfirewalled machine with a public IP, and then anyone can log in to your Windows container using RDP
@@WolfgangsChannel My original comment was to say that even if your host machine is firewalled you should double check that you're not exposing 3389 to networks you don't want it to be available on. I ran into that issue with an FTP container on a production machine once. Thankfully blue team found it.
You can just do 127.0.0.1:port:port instead of port:port
this will only bind to 127.0.0.1 instead of 0.0.0.0
Docker will ignore any and every firewall rules because that is its purpose. It directly opens ports using iptables.
You can use host networking if you want a container to follow your firewall rules.
nftables, not iptables. iptables is deprecated and will be removed in the future.
Love your sense of humor. Super subtle.
Thank you for the discovery of this project.
Hello. Thank you for the video, it is really instructive. This is the first video from you I watch, so excuse me if you have already answered my questions in previous videos.
I am *really* new into docker, in fact, I am barely documenting on the subject because I recently had the 'idea' of running Office 365 in Docker (knowing nothing about it before hand) instead of my MacOS Parallels Desktop VM which I do since 2010 when I switched from Windows.
1. What would be the advantages of the change, and would be the trade-offs?
2. Since I know *nothing* about Docker except for a couple of videos I have watched about it, would you recommend me to change my VM to Docker? (Knowing I need to use Office 365 for developing macros, Excel, Power Query and other heavy Office add-ins in my day-to-day work)
3. Do you have or do you have links to videos where I can learn Docker from scratch?
Thanks!
I'm already using harvester to run my vm's and containers. It technically runs vm's as pods ontop of kubernetes so this may not be for me, but I have an idea which I can use this project for, deploying cms windows displays. Since the player will be always be in fullscreen, I can simply use any broswer, connect with ip address and have the content displayed on the tv or media screen device. Thanks very much for the video.
I can already play minesweeper on Linux with KMines or winemine, and play pinball with the open source SDL version (which I believe is reverse-engineered from winxp). I'm using my Windows VM for compiling C++ code for Windows with MSVC, and occasionally for some light 3D gaming. This would work for the compilation part, even better than a persistent VM.
Super slick!!!!!!
Im not a programmer so its been challenging to find a use case for me to try Docker. This maybe my Gateway drug!
Just keep in mind that this isn't a real container. Windows is being virtualized by the KVM kernel driver which means it's a VM and not a container. This video is a bit misleading
fantastic. love it..
thanks wolfgang!
Excellent video, Wolfgang. Thank you! Is this possible on docker desktop?
What a juicy content, thank you sir I was in need of it
this just saved me hours of work, thanks
Thanks for sharing. This is really rather cool to hear about.
How to save the iml file once opened and pasted the commands ?
I don't know how to save the file.
are there any specific keyboards shortcuts?
Internally we're going to start with setting up the container as a way to test intune and autopilot configurations, before we deploy them in production. Makes testing much easier !
0:34 You don't need an MS account. Just choose other and choose a domain, then it lets you sign in locally.
Thank you, this is awesome ! I was wondering, on Proxmox, is there a port or an equivalent of this project, but in an LXC container ?
Hi, I have proxmox on a server with the virtaulize option enabled, but when I create a VM does not allow me to create the container because there is no /dev/kvm, I have to create the machine with some option ?
I wonder what the viability of running blueiris with gpu decoding is.
Hello...Used in Ubuntu...when you finish using Windows 11 (by default)...what is the path to eliminate the Used and Unnecessary Space by Windows 11 in the Download of the .iso and in the Decompression of the .iso ...Thank you 😊
Was watching this video in sleepy mode this morning. Great stuff! Even put some smiles on my face and made me laugh! Well done! :) Ive seen all the macOS buttons and was ready to undust my MacBook...but reading your CORRECTION now in the comments. NOT on Mac. Too bad. ^^ Anyway, appreciated!
Pretty cool! Wouldn’t you lose the best perk of Docker Containers tho? Talking about the fact that they use the same kernel as the host. This seems to me like it only adds an additional, superfluous layer of abstraction
Thank you. This is brilliant.
I do have a question. How did you download that youtube video using ed/ ? I can't figure that out.
Also, how do you run the multiple version of Windoze at the same time? How does your compose.yaml file looks like for that?
I tried creating another with different ports for the noVNC, but I could never connect to it. I see you have all the shared data* folders in the same folder. If you could share this step that would be great.
Enjoying your videos :)
One of my 2024 goals is to begin using Docker for some of my tasks as a software engineer doing medical imaging research. Although this is not exactly what I need I plan to give it a test..
This would be incredibly awesome for testing and/or JPackage. I think I know what i'm doing this weekend :)
Is there the possibility of doing a pass through and using the video card for this docker and performing heavier tasks such as video editing or games?
This is awesome! Vt-d is not relevant though. Will have to modify it to try 11arm on apple silicon
I have Windows 11 Pro installed and running in Ubuntu as a Docker container but I can't get the sound working. Did I miss something in the video somewhere about getting sound to work in the Windows VM?
Did you have to install anything for your macOS to have the file /dev/kvm? Mine doesn't have, even after installing qemu, libvirt and some other software
Yeah I'm wondering how to get this to work under MacOS Monterey as well.
Does anyone know why the container stops after a few minutes of being started?
This was pretty good. However, I could not find an environment setting that would have the container built from a local windows iso file. Is downloading every time the only way for now?
I couldn't find a way to activate audio. Gemini and Copilot have some suggestions about using Pulseaudio in Windows, which I did to no avail. Has anyone managed to activate audio?
Thanks for the video. Is it possible to change the hypervisor from KVM to VMware?
There's also quickemu, which IMO seems better at this for a workstation PC.
This project however may make more sense if you want the VM to be reachable from outside (and just have a simple setup, no need for something like proxmox), since it comes with a webclient etc.
Missed Opportunity: Naming it "Linux Subsystem for Windows"
Does it run in TrueNAS in k3s ? or in LXC on proxmox? Yes I am Terrible.
I have myThinkPad running Arch for a while now. this is useful to have a Windows option on standby.
Also my one remaining windows box will go native Linux now
Theres an application that I can use to change the RGB lights on my keyboard but it only has windows compatibility. Would it be possible to run windows in a container, install that application in that container and then use it to change the lights on my keyboard?
can u share your yml settings? does this remember your setting and install applications? can i backup to use on another machine. like i can with kvm
How could it apply a firmware update for your system in a VM?
Finally someone show something Very important
All the files gets remove once we shutdown is there anyway we can we can save it for later as well.
I needed 1 year ago Windows for a game. But I didn‘t want to dualboot. So I setup a VM with libvirt and then did a single-gpu-passthrough. I needed a bit to get it working, because I had a Problem, that was really rare, there was only one open thread that you could find and that was on a Proxmox forum. Without the help of a other person, that found that, I might never get it to work. But with the time I didn‘t used the VM anymore and because I really often switch my Linux Distro, I started to not set it up again and nowadays I don’t have a use case for any VM‘s
Currently using Windows to develop and test my software, but I found a second PC using RDP to be the best for this use case.
Can i run windows server core with windows admin center and active directory inside it?
work for gaming? i have a t14 gen 2 i5 1135g7, i reed on some forum that this cpu doesn't have GVT-d this use SR-IOV that you can use only with ACRN hypervisor (single iGPU passthrough)
arch linux 8gb ram
Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory
@9:15 If MS had a problem, would they have already stopped WoR? (Windows on Raspberry)
Hi,
what about licenses if this is being installed in production scenarios for example?
Tnx
My guy has all the major OSes in 1 video
Last night I started looking for alternatives to run Windows on my mac, vid couldn't have had a better timing
You could always run a desktop version of VMware (VMware Workstation) and run Windows there, but I guess you want to run open-source software?
@@Equality-and-LibertyI've been a bit out of the vm scene and was going to virtualbox it, this served it's purpose and there's no clean up to do after other than image and container in docker, pretty sweet
This video will hit millions of views!
just tried it, amazing! thanks!!
This video contains at least two crucial errors:
1) in the compose.yaml file, The CPU_CORES value must also be inside double quotes:
2) "docker compose up -d" won't do anything. "docker-compose" is a separate command that may have to be explicitly installed in your system. After doing that, the correct comand is "docker-compose up -d"
docker-compose refers to deprecated compose v1. docker compose is the „correct“ way to do it since v2: docs.docker.com/compose/migrate/#how-do-i-switch-to-compose-v2
Finally! I can use my laptop (which has arch installed btw) for autocad because of a stupid class at uni.
Hello. I have got Parallels on my mac m1 to run windows. But the arm architecture off the mac processor makes impossible to use NDI tools app. Could the solution you expose solve my problem ? Sorry if my question is stupid :)
My heart dropped a beat at the title of the video
Why do you want to edit the Z690M-ITX bios? Is there any secret power saving tricks perhaps?
does this solution avoid the problem of nested virtualization on Apple silicon chips?
context: the apps I require to test on windows need wsl2+docker (on windows). at the moment (at my knowledge) is not possible to achieve this environment on any Apple silicon chip (like M1, M2 or M3) forcing me to use a separate machine with x86_64 cpu
It would not avoid it, you won’t be able to run WSL2 inside this.
If you’re using VMs anyway, just use WSL1 and use the VM network to connect to a docker daemon on a Linux VM.
@Wolfgang's Channel : (a bit off topic here) Would it be an idea to test a range of UPS devices for functionality and power consumption? Every home lab needs a UPS of some sort, and idle power consumption varies a lot between models.. Would be nice to see a shoot out?
Windows: not even once
All power users use all the possible platforms.
I did everything shown here. But unable to connect with microsoft remote desktop. Can you help ?
Awesome thank you!
It would be interesting to know how responsive the Windows "docker container" is without a passthrough GPU, since video acceleration would not be available and everything will be rendered via software. Currently, I have a Windows VM with GPU passthrough for my ONE use: running MS Office for work. If the docker container can run with the same responsiveness as an older machine (say, i7-6700 with its iGPU) without the need for a dedicated GPU to be passed through, that would be really great for my use case.
If you don’t need the OneDrive integration, which doesn’t work well, the Linux version of CrossOver runs Microsoft Office pretty well.
@@paradoxmoCrossover is too expensive in most countries
@@applmango sure, Wine or PlayonLinux then. Or VMware player has decent paravirtualized 3D.
Now I can run heroes III again
How do I connect it to network drives?
Windows product keys used are in the /assets XML files, so if one has licenses, I assume they can pre-configured to "valid" ones. :)
Cool idea and workaround!
Would for older Windows versions too?
So its like Vagrant but inside a Docker container?
Please help, can I run games like Counter Strike with this setup on my macbook?
Let me know when you have a video running windows in a Vanilla OS container or similar. Thanks
Wow seems very useful to me since I yearly need an old Windows program to handle my taxes. It's a hassle every year but this docker might be the solution for running windows 15 minutes yearly.
Has anyone tried this with Oracle's OCI? Is there a way to have this accomplished on a cloud environment?
Amazing! Thanks!
Can we install windows on ubuntu
Google shell if you know...
This is a pretty cool idea. My preference would be a win 11 ghost version.
I typically do proxmox -> win11 ghost
Because running vanillla windows iso is absolutely terrible.
I also use templates for this so you only do it once really (might not work for your use case)
an example of "just because it can be done, does not mean it should"
doubt, could this windows be integrated into "active directory"? Or would the host also have to have such integration?
Seems interesting, curious about malware problems though
The use of this would be to give to the students a virtual machine to work on with
I have the same motherboard, is there a reason you needed that BIOS utility?
How to run a dotnet application using weston wayland compositor ob Ubuntu?
Hi there, i got error when i past the command from the gethub and my server say docker: unknown server OS: .
See 'docker run --help'. please help me. Thank you
Any idea if you can run Visual Studio and WinForms inside this? I imagine there might be a lot of lag, but would be fun to try it
Lag is when your mom blow my job