帮助用户在 Docker 中创建、管理并通过 SSH 连接无头 Windows 11 虚拟机。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "windows-vm" 技能: 1. 下载 https://raw.githubusercontent.com/obra/superpowers-lab/main/skills/windows-vm/SKILL.md 2. 保存为 ~/.claude/skills/windows-vm/SKILL.md 3. 装好后重载技能,告诉我可以用了
请帮我启动一个新的无头 Windows 11 Docker 虚拟机,并告诉我 SSH 连接方式与可用状态。
返回虚拟机已启动的状态、连接信息,以及后续可执行的管理操作。
请重启当前的 Windows 虚拟机,并检查它是否已正常恢复运行,输出最新状态。
返回重启结果、当前运行状态,以及是否可以继续通过 SSH 连接。
请提供连接这个 Windows 11 虚拟机的 SSH 命令、必要参数,以及连接前需要确认的事项。
返回可直接使用的 SSH 连接命令、参数说明和连接前检查清单。
Manage a headless Windows 11 VM running via dockur/windows in Docker with KVM acceleration. The VM is accessible via SSH only — no RDP or GUI required.
/dev/kvm must exist — check with ls /dev/kvm)sshpass (sudo apt install sshpass)imagemagick (optional, for screenshot debugging: sudo apt install imagemagick)windows11$HOME/windows-vm/
storage/ — VM disk image (managed by dockur, wiped on recreate)iso/win11x64.iso — cached Windows ISO (7.3GB, persists across recreates)oem/install.bat — post-install script (installs OpenSSH Server)localhost:2222 (bound to 127.0.0.1 only)localhost:3389 (bound to 127.0.0.1 only, fallback)localhost:8006 (VNC in browser, for debugging)Ensure directories exist:
mkdir -p "$HOME/windows-vm/oem" "$HOME/windows-vm/storage" "$HOME/windows-vm/iso"
Ensure $HOME/windows-vm/oem/install.bat exists with OpenSSH setup:
@echo off
echo Installing OpenSSH Server...
powershell -Command "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0" 2>nul
powershell -Command "Get-WindowsCapability -Online -Name OpenSSH.Server* | Add-WindowsCapability -Online" 2>nul
dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0 2>nul
powershell -Command "Start-Service sshd" 2>nul
powershell -Command "Set-Service -Name sshd -StartupType Automatic"
powershell -Command "New-ItemProperty -Path 'HKLM:\SOFTWARE\OpenSSH' -Name DefaultShell -Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -PropertyType String -Force"
powershell -Command "New-NetFirewallRule -Name 'OpenSSH-Server' -DisplayName 'OpenSSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22"
powershell -Command "Get-Service sshd" 2>nul
echo Done.
If recreating, remove the old container and disk:
docker stop windows11 && docker rm windows11
rm -f "$HOME/windows-vm/storage/data.img"
Launch the container. There are two cases:
If cached ISO exists ($HOME/windows-vm/iso/win11x64.iso):
docker run -d \
--name windows11 \
-p 127.0.0.1:3389:3389 \
-p 127.0.0.1:2222:22 \
-p 127.0.0.1:8006:8006 \
-e RAM_SIZE="8G" \
-e CPU_CORES="4" \
-e DISK_SIZE="64G" \
-e USERNAME="user" \
-e PASSWORD="password" \
--cap-add NET_ADMIN \
--device /dev/kvm \
-v "$HOME/windows-vm/storage:/storage" \
-v "$HOME/windows-vm/oem:/oem" \
-v "$HOME/windows-vm/iso/win11x64.iso:/boot.iso" \
dockurr/windows
First time (no cached ISO) — omit the /boot.iso mount and add VERSION:
docker run -d \
--name windows11 \
-p 127.0.0.1:3389:3389 \
-p 127.0.0.1:2222:22 \
-p 127.0.0.1:8006:8006 \
-e RAM_SIZE="8G" \
-e CPU_CORES="4" \
-e DISK_SIZE="64G" \
-e VERSION="win11" \
-e USERNAME="user" \
-e PASSWORD="password" \
--cap-add NET_ADMIN \
--device /dev/kvm \
-v "$HOME/windows-vm/storage:/storage" \
-v "$HOME/windows-vm/oem:/oem" \
dockurr/windows
After the ISO downloads and Windows boots, immediately copy the ISO out before
the container is ever stopped (dockur wipes /storage on recreate):
cp "$HOME/windows-vm/storage/win11x64.iso" "$HOME/windows-vm/iso/win11x64.iso"
Wait for Windows install + OpenSSH setup to complete. This takes 20-30 minutes for a fresh install (the OEM install.bat runs at the end of Windows OOBE and downloads OpenSSH from Microsoft, which is slow). Monitor with:
…
按需通过 mcp CLI 调用 MCP 服务,发现工具与资源而不预加载上下文
帮助你审计代码库,找出语义重复但命名或实现不同的函数
帮助你通过 tmux 控制需实时交互的命令行会话,安全运行编辑器、REPL 和交互式 Git 操作。
帮助你撰写不过时的代码注释,聚焦做什么与为什么而非时序背景。
先用伪代码梳理方案与迭代思路,再高效转成可执行代码。
帮助开发者用早返回或表驱动方式简化嵌套条件分支,提升代码可读性。
帮助你选择与管理 Azure VM/VMSS,并排查连接、扩缩容与容量预留问题。
让 AI 通过自然语言管理电脑已安装软件的查看、打开与关闭。
帮助 AI 自动化操作 Windows 桌面应用,稳定定位控件并验证执行结果。
通过 SSH/SFTP 远程执行命令、管理服务器并安全传输文件。
通过 MCP 管理 SSH 交互会话,执行命令并控制会话生命周期。
帮助用户在 Claude Code 中高效管理 Hetzner 云服务器与 SSH 密钥