Running Windows in a Docker Container!
Вставка
- Опубліковано 2 сер 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
UA-cam 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 - Наука та технологія
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'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
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
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.
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".
A truly interesting and definitely useful video - well presented. I'm going to give this a try. Thanks!
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!
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
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
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.
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 :)
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.
I can't believe I haven't came across this sooner, this is awesome.
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.
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.
Love your sense of humor. Super subtle.
What a juicy content, thank you sir I was in need of it
A great explanation, I followed along and did the Win 11 install on Ubuntu 24.04 LTS and it was seamless. Thanks!!
Thank you for the discovery of this project.
fantastic. love it..
thanks wolfgang!
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?
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..
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.
Hi,
what about licenses if this is being installed in production scenarios for example?
Tnx
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 ?
this just saved me hours of work, thanks
Thanks for the video. Is it possible to change the hypervisor from KVM to VMware?
Thanks for sharing. This is really rather cool to hear about.
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 😊
Can i run windows server core with windows admin center and active directory inside it?
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!
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
just tried it, amazing! 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.
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.
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?
Excellent video, Wolfgang. Thank you! Is this possible on docker desktop?
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
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
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.
How do you edit BIOS when it's still vm with own BIOS?
It outputs a bios file, which you can load to a flash drive, boot to your bios, and load the configuration file there. It's not docker updating the bios directly. At least that's what I think is happening
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?
How could it apply a firmware update for your system in a VM?
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
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 ?
I wonder what the viability of running blueiris with gpu decoding is.
running under docker on Synology (xpenology) I got an error with the devices /dev/kvm so I commented out those lines in the docker compose yaml and then the container started. I do have the web gui on port 8006 but will I have problems running Windows?
Yes - disabling KVM acceleration will make your Windows VM a lot slower
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
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!
0:34 You don't need an MS account. Just choose other and choose a domain, then it lets you sign in locally.
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 !
Can you use this to update the host PC bios? Often that is the easiest from windows.
I don't think so
Does anyone know why the container stops after a few minutes of being started?
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
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
I have the same motherboard, is there a reason you needed that BIOS utility?
Missed Opportunity: Naming it "Linux Subsystem for Windows"
I need it to code in C# for windows from my MacBook m1 pro. I was evaluating parallels 19... Do you think I can use this one instead? 🤔 I wonder the difference in CPU/RAM % ... Maybe you can make a comparison
Nope, you need a Linux host for it
Finally someone show something Very important
I am getting an error message saying "Failed to connect to Server" shown in VNC. I am running this on a raspberry pi 5. Any ideas on how I can resolve this?
Too weak
How do I connect it to network drives?
This video will hit millions of views!
All the files gets remove once we shutdown is there anyway we can we can save it for later as well.
This would be incredibly awesome for testing and/or JPackage. I think I know what i'm doing this weekend :)
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?
How long does it take from starting container until it’s ready to use?
Will depend on your Internet connection, since it has to download the Windows image. I'd say 15-20 minutes.
If you can somehow 'cache' the installed state in your pipeline, this would bring it down to less than 20 seconds. But since it's a testing pipeline, you'd probably want a "fresh" installation every time for consistency
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.
@9:15 If MS had a problem, would they have already stopped WoR? (Windows on Raspberry)
Is it possible to install this "Windows" in a Synology NAS Docker (Container Manager)? I found it dockurr/windows in the registration tab in my Synology, but it is not possible to run it. Can you give me some tips?
I don't see why it can't be run on a Synology. It is just a container like all the other containers. The only problem you can have is that it consumes a lot of resources, and that is the reason why I am not going to run it on Synology.
How would you set this up with podman?
Same way. podman-compose should work, I think
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.
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 :)
Hey Wolfgang! What font is that on your terminal? Thanks
Comic Code
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 :)
is it possible to update the bios on a lenovo laptop for example, it is safe to use in this environment for BIOS update, which requires win?
No
Thanks for this video. Can you add a igpu and output to external monitor (HDMI/VGA output)?
Theoretically yes, in practice you’ll need the VGABIOS and that might get complicated
Can we install windows on ubuntu
Google shell if you know...
My guy has all the major OSes in 1 video
My heart dropped a beat at the title of the video
This is awesome! Vt-d is not relevant though. Will have to modify it to try 11arm on apple silicon
If i had this last week... Probably end up switching to this as a full fat vm takes a ton of resources... But i can't see windows taking less in a container?
because it's still a VM, just an automated installer and a Webinterface slapped on top
I saw in your start menu you have Lumiar Neo. Have you tested that in this setup? I used to try to get some photo editing tools to run in a kvm vm, but there was always the problem of not having installed opencl or some other hardware acceleration frameworks. Could say something more about that?
I've no idea what Luminar Neo is, sorry
@@WolfgangsChannelit's in the start menu at 5:53 but I guess that this is a windows ad then hahaha
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?
what is the font that you are using for the terminal?
Comic Code
Windows: not even once
All power users use all the possible platforms.
Awesome thank you!
Please help, can I run games like Counter Strike with this setup on my macbook?
Hey bro I just watched your video on NAS vs Home servers. When you say you stream media, its only local right? How would you stream it remotely or on your phone?
VPN into my home network
Finally! I can use my laptop (which has arch installed btw) for autocad because of a stupid class at uni.
Would for older Windows versions too?
I wonder if a GH Actions workflow can be created from this, since a Python app I made won't compile to Windows properly under a workflow that uses PyInstaller running under Wine
Yes, but you'll likely want to set up a custom runner. I doubt that the free GH runners come with KVM support.
You can also disable KVM acceleration, but that will make the VMs veeeeeeeery slow
Correction: no one needs a Microsoft Account to run Windows, unless you don't care about your privacy. And that's without any reduction in functionality or support and only a negligible reduction of services.
Amazing! Thanks!
Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory
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?
Thats gold right there!