Docker Engine + Windows 11 VM (on Linux Mint 22.1) — Cheat Sheet¶
Host: Linux Mint 22.1 (Ubuntu 24.04 base) · CPU: AMD (SVM) · Goal: Install Docker Engine, and run a Windows 11 VM via Docker (dockurr/windows).
1) Install Docker Engine (from Docker’s APT repo)¶
Your system already has the Docker repo configured. If not, follow Docker’s official instructions for Ubuntu 24.04 first.
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Enable + start
sudo systemctl enable docker
sudo systemctl start docker
User without sudo: add your user to the docker group and re-login.
Sanity checks:
2) Prepare KVM (hardware acceleration)¶
Check CPU virtualization flags (AMD = svm expected):
If /dev/kvm is missing, enable SVM in BIOS/UEFI:
- Reboot → BIOS (Del) → Advanced CPU Settings → SVM Mode: Enabled → Save & exit.
Load KVM modules and verify:
sudo modprobe kvm
sudo modprobe kvm_amd # Intel would be: kvm_intel
lsmod | grep -E '(^kvm$|kvm_amd)'
ls -l /dev/kvm # expect: crw-rw---- root kvm
If needed (until next reboot):
Make modules persistent:
Diagnostics if loading fails:
dmesg | grep -i kvm
modinfo kvm | head
modinfo kvm_amd | head || sudo apt install -y linux-modules-extra-$(uname -r)
3) Create Windows 11 VM via Docker (dockurr/windows)¶
Project folder:
compose.yaml (basic, auto-download Windows 11 Pro):
services:
windows:
image: dockurr/windows
container_name: win11
environment:
VERSION: "11" # 11 Pro; 11l = LTSC
RAM_SIZE: "8G" # adjust
CPU_CORES: "4"
DISK_SIZE: "128G"
USERNAME: "Docker" # optional: first-boot user
PASSWORD: "admin"
devices:
- /dev/kvm
ports:
- "8006:8006" # web console (noVNC)
- "3389:3389/tcp" # RDP
- "3389:3389/udp"
volumes:
- ./windows:/storage # persistent VM storage
restart: unless-stopped
stop_grace_period: 2m
Use your own ISO (instead of auto-download): add a line under volumes:
volumes:
- ./Win11_24H2_English_x64.iso:/boot.iso # your ISO beside compose.yaml
- ./windows:/storage
When
/boot.isois present,VERSIONis ignored.
Start the VM:
Access console (installer): - Browser → http://localhost:8006 - Proceed with standard Windows setup (choose Windows 11 Pro for RDP support).
Use RDP for better performance (Linux Mint):
sudo apt install -y remmina freerdp3-x11
remmina # connect to 127.0.0.1:3389 (user/password from above)
Lifecycle:
docker ps
docker stop win11
docker start win11
docker compose up -d # apply resource changes after editing compose.yaml
4) Optional: Shared folder & LAN IP¶
Share a host folder to the VM (exposed as SMB share inside the container):
In Windows:\\host.lan\Data (or use the container’s IP). Map as a drive if desired.
Give the VM a dedicated LAN IP (macvlan):
# Create network (adjust subnet/gateway/parent NIC)
docker network create -d macvlan \
--subnet=192.168.1.0/24 \
--gateway=192.168.1.1 \
--ip-range=192.168.1.200/29 \
-o parent=enp4s0 vlan
compose.yaml:
(Optionally add DHCP: "Y" and /dev/vhost-net to let Windows request its own DHCP IP; see project docs.)
5) WinApps Prep¶
Inside Windows:
1) Install apps you want to publish (e.g., Office).
2) Ensure RDP is enabled and allowed in Firewall.
3) Create a stable local admin user + password.
4) Disable sleep/hibernate (Settings → Power → Sleep = Never).
Then follow WinApps’ Docker backend steps on Linux to generate launchers that RDP into this VM.
6) Troubleshooting quick refs¶
permission deniedon/var/run/docker.sock→ add user todockergroup, re-login, checkls -l /var/run/docker.sock(group docker, mode 660).context "desktop-linux" not found→docker context use default(or recreate default).docker-credential-desktopmissing → removecredsStore/credHelpersfrom~/.docker/config.json./dev/kvmnot found → enable SVM in BIOS,modprobe kvm kvm_amd, verify permissions.- Slow video → use RDP (
localhost:3389) instead of the web console. - Change RAM/CPU/DISK → edit env vars in compose,
docker compose up -d.